Quote Originally Posted by Mjolinor View Post
I didn't use these equations: http://paulbourke.net/geometry/torus/supertoroid3.gif

I used the standard parametric equations for a torus:
x = (r0 + r1(cos(v))* cos(u)
y = (r0 + r1(cos(v))* sin(u)
z = r1 * sin(u)

Which I derived from the parametric equations for a circle:
x = r * cos(v)
y = r * sin(v)

by substituting for "r".
Whoa, pardner. Have you made a typo?

x = cos(theta) * [ r0 + r1 * cos(phi) ]
y = sin(theta) * [ r0 + r1 * cos(phi) ]
z = r1 * sin(phi)

Shouldn't your z coordinate equation be written with v ?

And this series of equations will produce a round toroid with a round cross section. My need is for square toroids with square cross section.

OME