|
![](/i/fill.gif) |
Another solution:
I hope this can help you. The whole helix is created at once. At the end
you can reorient it as you wish.
cut here
-------------------------------------------------
#default{pigment{ rgb 1}}
camera{location 2*<0,5,-5> look_at 0}
light_source{<2,5,-5> rgb 1}
#declare R1 = 3; // the size of the circle
#declare R2 = 1; // the "size" of the helix
#declare R3 = .1;// point size
#declare Omega = 4*pi; //the speed of the helix
// around the circle
#declare n = 320 // number of points
#declare k = 0;
union{
#while(k < n)
#declare s = 2*pi*k/n;
sphere{
<
(R2*cos(Omega*s) + R1)*cos(s),
R2*sin(Omega*s),
(R2*cos(Omega*s) + R1)*sin(s)
>,
R3
}
#declare k = k + 1;
#end
} // here you can reorient your helix
-------------------------------------------------
Alberto
Post a reply to this message
|
![](/i/fill.gif) |