|
![](/i/fill.gif) |
Hi guys
Is the correct povray representation of the top two formulas at
http://mathworld.wolfram.com/Spirograph.html
#while (my_degrees < 360)
#declare x_loc = (radius_fixed + radius_rotating) * cos(my_degrees / 57.3)
-
(radius_rotating + spiro_offset) * cos(((((radius_fixed + radius_rotating)
/
radius_rotating)) * my_degrees) / 57.3);
//#debug concat("X:" , str(x_loc,3,3) "\n")
#declare y_loc = (radius_fixed + radius_rotating) * sin(my_degrees / 57.3)
-
(radius_rotating + spiro_offset) * sin(((((radius_fixed + radius_rotating)
/
radius_rotating)) * my_degrees) / 57.3);
//#debug concat("Y:" , str(y_loc,3,3) "\n")
sphere
{
<x_loc,y_loc,0>,0.25
material
{
texture
{
pigment
{
color Red
}
}
}
}
#declare my_degrees = my_degrees + 0.5;
#end
as regards the conversion of degrees to radians in order to use Povray's sin
and cos functions (which work with radians?)
I must be doing something wrong - the shapes look "sincos - like" but not
like those on the spirograph page...
Any help appreciated!
--
Stefan Viljoen
Software Support Technician / Programmer
Polar Design Solutions
Post a reply to this message
|
![](/i/fill.gif) |