In geometry, a torus (pl. tori) is a surface of revolution generated by revolving a circle in three dimensional space about an axis coplanar with the circle. Examples of tori include the surfaces of donuts and inner tubes.
In addition to the common donut torus shape, there are several other forms of a torus. For instance, if the hole in the middle of a torus collapses to a single point, the torus is called a vortex torus. A torus may also have the shape of an apple or lemon. Donut, apple, lemon, and vortex tori are shown in the figures below.
A torus has two radii: the minor_radius which is the radius of the circle being rotated, and the major_radius which is the distance from the center of the circle being rotated to its axis of rotation. If the magnitude of the major_radius is greater than the magnitude of the minor_radius, the torus will be a donut torus; however, if the magnitude of the major_radius and minor_radius are equal, the surface will be a vortex torus. (The hole in a vortex torus is infinitely small.) If the magnitude of the minor_radius is greater than the magnitude of the major_radius, the surface is self-intersecting. To eliminate this self-intersection the surface is divided into two regions. The inner region is the lemon torus. The outer region is the apple torus. Alternatively, the circle being rotated can be split where it intersects the axis of revolution. Revolving the smaller arc will generate a lemon torus. Revolving the larger arc will generate an apple torus. Thus, the magnitude of major_radius relative to the magnitude of the minor_radius determines the type of the torus:
- donut : |major_radius| > |minor_radius|,
- apple : |minor_radius| > major_radius > 0,
- lemon : major_radius < 0, -major_radius < |minor_radius|, and
- vortex : |minor_radius| = major_radius.
The apple, lemon and vortex torus are all degenerate forms. It is not valid for major_radius to be both negative and numerically larger than minor_radius. Note that the lemon and apple have the same mathematical form, and differ only in their range of definition (not in the parametric range sense). The sign of major_radius indicates which portion of the surface is defined. (If the major_radius is positive an apple torus is defined; if it is negative, a lemon torus is defined.) The value of minor_radius is negative if the torus is hollow. In other words, if the minor_radius is positive, the surface normal points outward; if it is negative, the surface normal points inward.
Four further data members define the parameterization of the torus:
- normal is the normal of the plane containing the circular spine. This is a SPAunit_vector.
- centre is the center of the torus. This is a SPAposition.
- uv_oridir is the direction from the center of the torus to the origin of parameter space. This is a SPAunit_vector.
- reverse_v is a flag specifying the direction of the constant -parameter lines, which are circles around the torus axis. The direction is specified by the right-hand rule around the torus axis, but may be reversed if this flag is true.
A torus is defined by a circular spine and a circular cross-section at each point on the spine. The spine of a torus is defined by a center point (centre), axis direction (normal), and major radius (major_radius). The circular cross-section is defined by a minor radius (minor_radius). Each circular cross-section is centered on the spline curve and is in a plane perpendicular to it. The parametric equation for a torus is:
is major_radius, is minor_radius, is the center point (centre), is the axis (normal), is uv_oridir, , which is negated if reverse_v is TRUE,
The -parameter is the latitude, with zero on the circle of greatest radius about the torus axis, and the positive direction in the direction of the torus axis. The -parameter range depends upon the relative values of the major and minor radii. For a donut, where the major radius is greater than the magnitude of the minor, the default (unsubsetted) range runs from to , and it is periodic. For degenerate tori, where the magnitude of the major axis is less than or equal to the magnitude of the minor axis, the default range is from to , where
and the surface is singular at each end of the range. (A -parameter curve runs in the direction of increasing parameter with a constant value. The range of a -parameter curve is the same as the -parameter range of the torus.)
The -parameter is the longitude, and the default (unsubsetted) range runs from to , with 0.0 on the meridian containing uv_oridir, and increasing in the direction specified by the right-hand rule around the torus axis, unless reverse_v is TRUE when it increases in the opposite direction. (A -parameter curve runs in the direction of increasing parameter with a constant value. The range of a -parameter curve is the same as the -parameter range of the torus.)
The apple and lemon types are distinguished by negating the major_radius for a lemon: this changes the points returned by the formula above.
This parameterization is left-handed for a convex torus and right-handed for a hollow one, if reverse_v is FALSE, and reversed if it is TRUE. When the torus is transformed, the sense of reverse_v is inverted if the transform includes a reflection. No special action is required for a negation.
The variables uv_oridir, pole_dir and reverse_v define the torus parametrization and are consistent with the same variables used for spheres.
- Tori are not true parametric surfaces.
- Tori are closed in but can or cannot be closed in .
- Degenerate tori are not periodic in ; non-degenerate tori are periodic in with period with range [ , ).
- All tori are periodic in with period with range [ , ).
- Degenerate tori are singular in at the poles (apices): all other values of and are non-singular.
- Constructors – contains API functions and Scheme extensions for the creation of toroidal surfaces.