|  |  | 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?...
Again, thank you for your time.
 Post a reply to this message
 |  | 
|  |  | majucatur <maj### [at] yahoo com> wrote:
: does exist a torus mathematical formula?...
  The torus function is:
sqrt((sqrt(x^2+z^2)-Rmaj)^2 + y^2) - Rmin = 0
-- 
#macro M(A,N,D,L)plane{-z,-9pigment{mandel L*9translate N color_map{[0rgb x]
[1rgb 9]}scale<D,D*3D>*1e3}rotate y*A*8}#end M(-3<1.206434.28623>70,7)M(
-1<.7438.1795>1,20)M(1<.77595.13699>30,20)M(3<.75923.07145>80,99)// - Warp - Post a reply to this message
 |  | 
|  |  | 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
 |  |