[comp.graphics] parametric torus

bobz@truevision.com (Bob Zigon) (03/06/91)

Can a torus be represented as a parametric equation? If so,
does anyone have the definition?

Bob Zigon
:
:

stam@dgp.toronto.edu (Jos Stam) (03/07/91)

bobz@truevision.com (Bob Zigon) writes:

>Can a torus be represented as a parametric equation? If so,
>does anyone have the definition?

Sure it can. Each point on the torus can be defined by two angles. Let r
be the radius of the cross-section of the torus and R be the radius of the
torus. I will assume that the torus lies in the x-y plane. The parametric
equation is then:

x(a,b) = cos(a)(R+cos(b)r)
y(a,b) = sin(a)(R+cos(b)r)
z(a,b) = sin(b)r

with a and b in the range [0,2\pi)
---------
Jos