POV-Ray : Newsgroups : povray.newusers : Sphere Sweep/Splines : Re: Sphere Sweep/Splines Server Time
31 Jul 2024 02:19:40 EDT (-0400)
  Re: Sphere Sweep/Splines  
From: Mike Williams
Date: 29 Mar 2003 23:26:13
Message: <4BJSOEAeFnh+Ewfy@econym.demon.co.uk>
Wasn't it K Schultz who wrote:
>Hi,
>
>I'm basically trying to cut a standard torus into about 5 uneven segments
>with spaces in between. At first I was going to cut the torus with the
>Difference {} command, then add sphere of the same radius as the torus to
>the end. It doesn't really work ( i was cutting the torus with boxes, should
>I use something better?)

As long as the sections are less than half a torus, I'd suggest cutting
the torus with two planes, one for each end. Rotate the planes around
the centre of the torus and invert one of them. I guess that your
problem with boxes is that they cut the torus at an angle.

Something like this:-

global_settings {assumed_gamma 1}
camera {location  <0,2,2> look_at 0}
light_source {  <-30, 100, -30>  color rgb 1}
                         
#declare Radius=0.2;// minor radius of torus & radius of spheres                      
  
#declare Start=45; // start angle: degrees
#declare End=170;  // end angle

union {
  difference {
    torus { 1, Radius}
    plane {z,0 rotate y*End}
    plane {-z,0 rotate y*Start}
  }
  sphere {x,Radius rotate y*Start}
  sphere {x,Radius rotate y*End}
  pigment {rgb x}
}


Post a reply to this message

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