|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
A first try at a spirogram a la Shay.
Total failure, but nonetheless something mildly interesting.
Anybody got code that does nice spirographs? Shay?
I tried implementing the algo at Mathworld, but obviously lacking in the
math department.
Lots of possibilities posed by this - most obvious is a "plekmatjie" in my
language - something that your granny would put the kettle on. Or over the
kettle.
Source in p.b.s.f.
Things to try - bring in some Z, colors, transparency, blobs, and other
objects - a world of possibilities.
Comments welcome or use in your own scenes. From a greater distance makes a
lice little round knitted tea-cosy or something.
--
Stefan Viljoen
Software Support Technician / Programmer
Polar Design Solutions
Post a reply to this message
Attachments:
Download 'spiro2.jpg' (110 KB)
Preview of image 'spiro2.jpg'
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Stefan,
Ouma would be proud of your doilies!
DLM
"Stefan Viljoen" <spa### [at] polardcom> wrote in message
news:428e330c@news.povray.org...
>A first try at a spirogram a la Shay.
>
> Total failure, but nonetheless something mildly interesting.
>
> Anybody got code that does nice spirographs? Shay?
>
> I tried implementing the algo at Mathworld, but obviously lacking in the
> math department.
>
> Lots of possibilities posed by this - most obvious is a "plekmatjie" in my
> language - something that your granny would put the kettle on. Or over the
> kettle.
>
> Source in p.b.s.f.
>
> Things to try - bring in some Z, colors, transparency, blobs, and other
> objects - a world of possibilities.
>
> Comments welcome or use in your own scenes. From a greater distance makes
> a
> lice little round knitted tea-cosy or something.
> --
> Stefan Viljoen
> Software Support Technician / Programmer
> Polar Design Solutions
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Stefan,
Perhaps the problem is your POV rather than your math?
Try keeping track of your last pos and drawing a cylinder between points
instead of all those smushed up spheres!
You may prefer to make an object of the cylinder collection.
i.e. modify your code to look a bit like this.
DLM
#declare radius_fixed = 1;
#declare radius_rotating = 4;
#declare spiro_offset = 1;
#declare my_degrees = 0.0;
#declare x_loc =0;
#declare y_loc =0;
#declare x_loc_o =0;
#declare y_loc_o =0;
#declare z_loc = 0;
//#declare z_fac = 0.0025;
#while (my_degrees < 360)
#declare x_loc_o =x_loc;
#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*/));
#declare y_loc_o =y_loc ;
#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*/));
cylinder {
<x_loc_o,y_loc_o,z_loc>,<x_loc,y_loc,z_loc>,0.025 //0.25
material {
texture {
pigment {
color Red
}
}
}
}
"Stefan Viljoen" <spa### [at] polardcom> wrote in message
news:428e330c@news.povray.org...
>A first try at a spirogram a la Shay.
>
> Total failure, but nonetheless something mildly interesting.
>
> Anybody got code that does nice spirographs? Shay?
>
> I tried implementing the algo at Mathworld, but obviously lacking in the
> math department.
>
> Lots of possibilities posed by this - most obvious is a "plekmatjie" in my
> language - something that your granny would put the kettle on. Or over the
> kettle.
>
> Source in p.b.s.f.
>
> Things to try - bring in some Z, colors, transparency, blobs, and other
> objects - a world of possibilities.
>
> Comments welcome or use in your own scenes. From a greater distance makes
> a
> lice little round knitted tea-cosy or something.
> --
> Stefan Viljoen
> Software Support Technician / Programmer
> Polar Design Solutions
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
The right honourable dlm penned on Saturday 21 May 2005 02:36:
> Stefan,
> Ouma would be proud of your doilies!
> DLM
Hey! Suid Afrikaner? Nie gedink daar is nog van ons hier ook nie...! :)
> "Stefan Viljoen" <spa### [at] polardcom> wrote in message
> news:428e330c@news.povray.org...
>>A first try at a spirogram a la Shay.
>>
>> Total failure, but nonetheless something mildly interesting.
>>
>> Anybody got code that does nice spirographs? Shay?
Thanks for looking - now I just need a kettle.
Lekker bly,
--
Stefan Viljoen
Software Support Technician / Programmer
Polar Design Solutions
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
The right honourable dlm penned on Saturday 21 May 2005 03:35:
> Stefan,
> Perhaps the problem is your POV rather than your math?
> Try keeping track of your last pos and drawing a cylinder between points
> instead of all those smushed up spheres!
> You may prefer to make an object of the cylinder collection.
> i.e. modify your code to look a bit like this.
> DLM
Thanks I'll try that!
I think I might be misunderstanding how to use sin and cos in pov - them
taking radians an'all. I think I am converting to radians at the wrong
place, mainly due to not figuring out my braces correctly. Just gotta keep
hacking at it.
Have you taken a look at
http://mathworld.wolfram.com/Spirograph.html
?
That's what I'm trying for - Shay posted some nice pics here a while ago
done with an algo he came up with that implemented those formulae. That
inspired me.
But anyway!
Got another trace running since last night I'll post later - still spheres
but with a bit more color and some Z factored in. Man my new HT CPU kicks
ass for rendering!
Thanks for the suggestion, I'll definitely try those cyls...
--
Stefan Viljoen
Software Support Technician / Programmer
Polar Design Solutions
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
I don't have the education to be educated by mathworld, but it looks (as
best I can tell) like they did the opposite of what I did.
You've got a big cirle of radius RAD that spins around 1 time in one
unit of TIME. So the POSITION on the big circle is:
(multiply by 2*pi to get radians from TIME)
POSITION = <cos(TIME*pi*2) , sin(TIME*pi*2), 0> * RAD;
Then put a smaller wheel whever that wheel is at. Make the small wheel
spin around something like 3.5 SPINS per one unit of TIME:
SMALLPOS = <cos(TIME*pi*2*SPINS) , sin(TIME*pi*2*SPINS), 0> * SMALLRAD;
Add POSITION and SMALLPOSITION together (or subtract, like Mathworld
did), and you're at the point for whatever TIME is on the graph. Connect
several TIME positions together, and you've got a spirograph.
Of course, That formula on Mathworld is just the beginning. <see attached>
-Shay
Post a reply to this message
Attachments:
Download 'spirograph.jpg' (122 KB)
Preview of image 'spirograph.jpg'
|
|
| |
| |
|
|
|
|
| |
| |
|
|
The right honourable Shay penned on Saturday 21 May 2005 18:43:
>
> I don't have the education to be educated by mathworld, but it looks (as
> best I can tell) like they did the opposite of what I did.
Neither do I have! That seems to be the problem.
> You've got a big cirle of radius RAD that spins around 1 time in one
> unit of TIME. So the POSITION on the big circle is:
Thanks for replying Shay - I'll give it a whirl.
Kind regards
--
Stefan Viljoen
Software Support Technician / Programmer
Polar Design Solutions
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"Stefan Viljoen >polard.com>" <spamnot@<<removethis> wrote in message
news:428ed677@news.povray.org...
> The right honourable dlm penned on Saturday 21 May 2005 02:36:
>
>> Stefan,
>> Ouma would be proud of your doilies!
>> DLM
>
> Hey! Suid Afrikaner? Nie gedink daar is nog van ons hier ook nie...! :)
Ek is nie daar nie - VSA toe.
And here's a refinement of your original - see source in p.b.s-f
Currently a kind of tiedied kasteel doily motif.
Play with the parameters.
Best...
DLM
Post a reply to this message
Attachments:
Download 'spiro.jpg' (33 KB)
Preview of image 'spiro.jpg'
|
|
| |
| |
|
|
|
|
| |