|
|
On Sun, 23 Jun 2002 20:01:51 -0500, James Taylor wrote:
> ...problem that's driving me mental, cos the solution is going to be so
> simple, but at the moment I just can't see it. :(
>
> I'm trying to create a helix using a sphere_sweep and I'm missing
> something - my limited maths tells me the points for a helix which
> extends along the x-axis should be:
> #declare value = 2*pi*i/N;
> <pitch*i,sin(value),tan(value)/sin(value)>
> where N is the number of points in the sphere_sweep and i is incremented
> in a while-loop
> -but its just plain wrong.
You're making it too hard. No need to mess with trigonometry here, just
use the vrotate() function (assuming I goes from 0 to N-1): vrotate(<
helixLength*I/(N-1), helixRadius, 0>, x*360*helixLoops*I/(N-1))
BTW, the usual solution using trig functions uses sin() and cos(). Oh, and
notice I capitalized the counter variable...it is a good idea to use at
least one capital letter in variable names to avoid conflict with future
POV features. Reserved words will always be lowercase, so using a capital
avoids that problem.
--
Christopher James Huff <chr### [at] maccom>
POV-Ray TAG e-mail: <chr### [at] tagpovrayorg>
WWW: http://homepage.mac.com/chrishuff/
Post a reply to this message
|
|