POV-Ray : Newsgroups : povray.binaries.images : how to : Re: how to Server Time
5 Nov 2024 10:21:21 EST (-0500)
  Re: how to  
From: repiv
Date: 8 Sep 2005 11:00:35
Message: <43205213$1@news.povray.org>
m.o.p.s wrote:
> Could you tell me if there is a simple way to build this shape. It's inside 
> a torus when major radius < minor radius. I realise one macro ( the blu 
> shape ) but it's empty, i would like to have this shape filled.
> thank you
> 
> i hpe that my english is understable 
> 
> 
> 
I think you'r looking for this:

//abs(Major) < abs(Minor)

#local Major2 = Major*Major;
#local Minor2 = Minor*Minor;

intersection {
   quartic {
     <1, 0, 0, 0, 2, 0, 0, 2, 0,-2*(Major2+Minor2),
      0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
      1, 0, 0, 2, 0,+2*(Major2-Minor2), 0, 0, 0, 0,
      1, 0,-2*(Major2+Minor2), 0, (Major2-Minor2)*(Major2-Minor2)>
     inverse
   }
   sphere {0, sqrt(Minor2-Major2)}
   bounded_by {sphere {0, sqrt(Minor2-Major2)}}
}


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.