|
|
majucatur wrote:
>
> Thank you to Peter Popov and Ron Parker for the information that you gave me
> on CSG, that were of great utility.
>
> I have another question, does somebody know how is expressed a torus
> mathematically?, the other figures don't represent a real problem, but does
> it seem that the torus is a compound figure, how can I calculate the normal,
> the intersections, etc. for a torus?, does exist a torus mathematical
> formula?...
For answers to some of your questions, you
may have a look into these posts of mine:
http://news.povray.org/povray.advanced-users/20922/138919
news://news.povray.org/3C292BC5.5A6AB4A6%40hotmail.com
http://news.povray.org/povray.advanced-users/20922/145305
news://news.povray.org/3C4B045F.DFBD5D79%40hotmail.com
And at this page you'll find a polynomial
equation for the torus:
http://www.nada.kth.se/hacks/doc/PoVRay/pov122.html
Here's a macro that will return a quartic torus:
#macro QuarticTorus(Rmaj, Rmin)
#local rxz = -2*(Rmaj^2 + Rmin^2);
#local ry = 2*(Rmaj^2 - Rmin^2);
#local rr = (Rmaj^2 - Rmin^2)^2;
quartic {
<
1, 0, 0, 0, 2, 0, 0, 2, 0, rxz,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 0, 0, 2, 0, ry, 0, 0, 0, 0,
1, 0, rxz, 0, rr
>
sturm
}
#end // macro QuarticTorus
Tor Olav
Post a reply to this message
|
|