QUADRIC SURFACES

A frequently used class of objects is the quadric surfaces, which are described with second - degree equations (quadratics). They include spheres, ellipsoids, tori, paraboloids, and hyperboloids. Quadric surfaces, particularly spheres and ellipsoids, are common elements of graphics scenes, and they are often available in graphics packages as primitives from which more complex objects can be constructed.
Sphere
In Cartesian coordinates, a spherical surface with radius r centered on the coordinate origin is defined as the set of points (x, y, z) that satisfy the equation

We can also describe the spherical surface in parametric form, using latitude and longitude angles Figure below:
The parametric representation in Equ. Below provide a symmetric range for the angular parameters

and

alternatively,
we could write the parametric equations using standard spherical coordinates, where angle

is specified as the colatitudes fig. below.
Then

is defined over the range

, and

is often taken in the range

.
We could also set up the representation using parameters u and v defined over the range from 0 to 1 by substituting

and

.
Ellipsoid
An ellipsoidal surface can be described as an extension of a spherical surface where the radii in three mutually perpendicular directions can have different values fig. below. The Cartesian representation for points over the surface of an ellipsoid centered on the origin is

And a parametric representation for the ellipsoid in terms of the latitude angle

and the longitude angle

in fig. below
Torus
A torus is a doughnut-shaped object, as shown in fig. below. It can be generated by rotating a circle or other conic about a specified axis. The Cartesian representation for points over the surface of a torus can be written in the form.

Where r is any given offset value. Parametric representations for a torus are similar to those for an ellipse, except that angle

extends over 3600.using latitude and longitude angles

and

, we can describe the torus surface as the set of points that satisfy