start:
randomize timer
fixed=int(rnd*200)+1
moving=int(rnd*200)-200
offset=int(rnd*200)+1
for t=1 to 1800000
x = (fixed+moving)*cos(t*(pi/180)) - (moving+offset)*cos(((fixed+moving)/moving)*t*(pi/180))
y = (fixed+moving)*sin(t*(pi/180)) - (moving+offset)*sin(((fixed+moving)/moving)*t*(pi/180))
if t=1 then
line (x+500,y+400)-(x+500,y+400),6
endif
line -(x+500,y+400),6
locate 1,1
print t
a = inkey
if a = "q" then end 0
next t
sleep
Right, basically that just draws a single random generated Spirograph. You may have noticed i'm using a massive loop to make sure it completes the cycle. Thing is, I know the length to complete the cycle can be calculated, but I just don't know where to start.
Any help would be appreciated, thanks. :)
--------------= Posted using GrabIt =----------------
------= Binary Usenet downloading made easy =---------
-= Get GrabIt for free from http://www.shemes.com/ =-