POV-Ray : Newsgroups : povray.text.tutorials : spiral : Re: spiral Server Time16 Sep 2021 21:29:54 EDT (-0400)
 Re: spiral
 From: Mike Williams Date: 30 Mar 2007 01:01:18 Message:
```
{
"@context": "https://schema.org",
"@type": "DiscussionForumPosting",
"@id": "#ZNn1sIAsaKDGFwYT%40econym.demon.co.uk",
"dateCreated": "2007-03-30T05:01:18+00:00",
"datePublished": "2007-03-30T05:01:18+00:00",
"author": {
"@type": "Person",
"name": "Mike Williams"
}
}
Wasn't it sahraoui who wrote:
>Actually
>I use a while loop to make my spiral and I can make
>as many as possible and it is rather simple
>it is a translation and a rotation.
>BUT with this method it is not easy to make the helix

If you're using a sphere_sweep, like this

#declare R1=1.5;
#declare F1=1.2;
#declare R2=0.15;
#declare N=100;
#declare H=10;

sphere_sweep {
b_spline
100,
#declare Y=0;
#while (Y<N)
<R1*sin(F1*Y),Y*H/N-H/2,R1*cos(F1*Y)>,R2
#declare Y=Y+1;
#end
pigment {rgb 1}
}

Then you can just add an extra sinusoidal factor to the x value of the
points, like this

#declare R1=1.5;
#declare F1=1.2;
#declare R2=0.15;
#declare N=100;
#declare H=10;

#declare F2=0.2;
#declare A=0.25;

sphere_sweep {
b_spline
100,

#declare Y=0;
#while (Y<N)
<R1*sin(F1*Y)+A*sin(F2*Y),Y*H/N-H/2,R1*cos(F1*Y)>,R2
#declare Y=Y+1;
#end
pigment {rgb 1}
}

--
Mike Williams
Gentleman of Leisure
```