next up previous contents index
Next: Lines and Planes Up: Geometric Data Structures Previous: Circles   Contents   Index

Spheres

A sphere is specified by a point and a radius, by default the origin and unity. Constructors are provided for a sphere of specified center that passes through a given point, and for a sphere given by a pair of antipodes:

  sphere(center, point);
  poles(north, south);
As for circles, translation and scaling operators are provided. Capabilities specific to geography and spherical geometry are described in Section 3.8.

The draw() function of a sphere draws the horizon visible from the current viewpoint. While this horizon is a circle in object space, its image in the screen plane is generally an ellipse. Further, antipodal points are not generally mapped to points that are symmetrically placed with respect to the center of this ellipse. These effects are most pronounced when the viewpoint is close to the sphere and the center is not close to the target.



Andrew D. Hwang 2004-09-04