|
![](/i/fill.gif) |
Hah! I eat torii for breakfast!
Since a torus is just a circle seen in the x-z plane (I'm assuming you
pick on y because you're taking that as the main axis), the formula
ought to be
(r-A)^2 + y^2 = B^2
where A is the major radius (origin to the midline of the curved pipe),
B is the minor radius (radius of the cross section of the pipe), and
r^2 = x^2 + z^2
You want it for y(x,z)? Easy.
y(x,z) = +- sqrt( B^2 - (r-A)^2 )
where you plug in
r = sqrt( x^2 + z^2 ).
This formula for y(x,z) involves a square root, for which you take both
signs, so there are two values in most places where the torus exists,
one value only where r = A-B or r=B+A, and no real values where r<A-B or
r>A+B. (Exercise for the student: if you plotted the imaginary values
of y(x,z) along y the y axis, what shape would you get?)
It would be fun to solve for x or z:
x(y,z) = +- sqrt( r^2 - z^2 )
where you plug in
r = A +- sqrt( B^2 - y^2 )
This formula for x(y,z) involve two square roots, giving four values in
the domain where y,z are in the torus (as projected onto the y-z plane).
Hope this helps. I'll send you my bill <g>.
--
Daren Scot Wilson
Member, ACM
dar### [at] pipeline com
www.newcolor.com
----------------------------------------------
Help the Cystic Fibrosis Foundation by
fighting in the Operating System Wars!
http://www.geocities.com/SiliconValley/Network/5601/
Post a reply to this message
|
![](/i/fill.gif) |