POV-Ray : Newsgroups : povray.newusers : Sphere Sweep/Splines Server Time
4 Nov 2024 19:22:03 EST (-0500)
  Sphere Sweep/Splines (Message 1 to 4 of 4)  
From: K Schultz
Subject: Sphere Sweep/Splines
Date: 29 Mar 2003 16:23:46
Message: <3e860ee2$1@news.povray.org>
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?) so I decided to use the sphere sweep. I just need
to get the sphere sweep to go on a radius of 1.25. I just can't figure out
how many control points, or where to put them to get a perfectly round
section. I'm looking for 5 segments about 1/8 of the circumfrence of the
circle long and I can't figure out the math at all.

Thanks for the help,

Kevin


Post a reply to this message

From: Ross Litscher
Subject: Re: Sphere Sweep/Splines
Date: 29 Mar 2003 17:05:30
Message: <3e8618aa$1@news.povray.org>
why wasn't difference working? that seems like the easier solution.


Post a reply to this message

From: Will W
Subject: Re: Sphere Sweep/Splines
Date: 29 Mar 2003 19:32:04
Message: <3e863b04@news.povray.org>
If my understanding of what you are trying to do is correct, then you may
find the wedge() macro in shapes.inc would do the job. You'd be able to cut
sections out of the torus like cutting servings out of a bunt cake.

--
Will Woodhull
Thornhenge, SW Oregon, USA
willl.at.thornhenge.net


"K Schultz" <sno### [at] optonlinenet> wrote in message
news:3e860ee2$1@news.povray.org...
> 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?) so I decided to use the sphere sweep. I just need
> to get the sphere sweep to go on a radius of 1.25. I just can't figure out
> how many control points, or where to put them to get a perfectly round
> section. I'm looking for 5 segments about 1/8 of the circumfrence of the
> circle long and I can't figure out the math at all.
>
> Thanks for the help,
>
> Kevin


Post a reply to this message

From: Mike Williams
Subject: Re: Sphere Sweep/Splines
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.