这是个好网站https://www.scratchapixel.com/lessons/mathematics-physics-for-computer-graphics/mathematics-of-shading
球坐标系到笛卡尔坐标系
笛卡尔坐标系到球坐标系
球坐标系的好处之一就是如果要旋转物体,那么只需加减角度就行了。