Texture Mapping a Torus

We can define a torus by the equations:

[Note: p = Pi = 3.141592. Define q as the angle from the X axis (0 <= q <= 2p) and f as the angle from the Z axis (0.0 <= f <= p).]

 

Then, with R as the inner radius and r as the outer radius:

X = (R + r cos (2 pv)) cos (2 pu)
Y = r sin (2 pv)
Z = (R + r cos (2 pv)) sin (2 pu)

Then:

v = arccos (Y/R)/2p
u = [arccos ((X/(R + r*cos(2 pv))]2p


Two-Dimensional Texture domain
HyperGraph Table of Contents.
HyperGraph Home page.

Last changed June 02, 1999, G. Scott Owen, owen@siggraph.org