next up previous contents index
Next: Animation Up: Reference Manual Previous: Recursive Fractal Curves   Contents   Index


Non-Euclidean Geometry

Hyperbolic line segments are specified by their endpoints in the upper half space or ball (Poincaré) models. In each case there is no output if either endpoint lies outside the model.

  hyperbolic_line(p, q);
  disk_line(p, q);
For compatibility with 2-dimensional hyperbolic space, the half-space model is the set $ \{(x_1,x_2,x_3)\mid x_2>0\}$.

A frame determines geographical coordinates on a sphere: the first element points toward longitude 0 on the equator, the third element points to the north pole. A latitude line depends on a sphere, a frame, the numerical latitude, and a range of longitudes. A longitude line is described similarly.

  latitude(lat, long_min,long_max, sphere S, frame coords);
  longitude(lngtd, lat_min, lat_max, sphere S, frame coords);
By default, coords is the standard frame and S is the unit sphere. These commands draw only the portion of the curve that is visible from the current viewpoint. The function back_latitude draws the invisible portion of a latitude line.

Parametrized paths on the unit sphere can be specified either by radial projection of a space curve, or by stereographic projection of a plane curve:

    plot_R(phi, t_min, t_max, n);    // radial
    plot_N(f1, f2, t_min, t_max, n); // from north pole
    plot_S(f1, f2, t_min, t_max, n); // from south pole
Attempts to perform radial projection on a path through the origin will generate division-by-zero errors. Stereographic projection maps the equatorial plane $ \{x_3=0\}$ to the unit sphere by projection from the corresponding pole: $ N=(0,0,1)$, $ S=(0,0,-1)$.

Each spherical plot command accepts a prefix front or back that prints only the portion of the path visible or invisible (respectively) from the current viewpoint.

Because of the way ePiX layers output, it is generally best to put hidden portions of the input before visible portions, with line width and/or style that suggests hidden lines.


next up previous contents index
Next: Animation Up: Reference Manual Previous: Recursive Fractal Curves   Contents   Index
Andrew D. Hwang 2004-09-04