Normally, the Cartesian coordinate system is used in
transformations and projections for graphics objects. In this
case, you simply specify a point using Z coordinates. In
practice, other coordinate systems can also be applied, and are
sometimes more convenient than the Cartesian coordinate system.
In this article, I will discuss the spherical coordinate system
in 3D space and show you how to create the spherical graphics
objects in this system. In the spherical coordinate system, a
point is specified by r, θ, and φ. Here r is the distance from
the point to the origin, θ is the polar angle, and φ is the
azimuthal angle in the Z plane from the X axis. In this
notation, I alternate the conventional Z axes so that the
computer screen is described by the Y plane. Figure 1 shows a
point in this spherical coordinate system Figure 1: Spherical
coordinate system. From this figure, we can obtain the following
relationships: The spherical coordinates (r, θ, φ) are related
to the Cartesian coordinates by: Sometimes it i