Hi All,
While looking for the answer to an problem found this site
http://linuxgazette.net/133/luana.html so bang something together that seam to work but I am sure it could be done better.
unrem the p=2*pi# and see what happens.
Rem Project: plotting1
Rem Created: 21/10/2008 13:58:59
Rem ***** Main Source File *****
rem found at this site
rem http://linuxgazette.net/133/luana.html
r as float
ar as float
p as float
R=100.0; ar=2.0; p=80.0
dim t(20001) as float
dim x(20001) as float
dim y(20001) as float
pi#=3.14
tt as float
tt=0.0
rem p=2*pi#
do
x(t)=(R-ar)*cos(tt) + p*cos((R-ar)*tt/ar)
y(t)=(R-ar)*sin(tt) - p*sin((R-ar)*tt/ar)
dot 200+x(t),200+y(t)
inc tt,.1
inc t
if t>20001 then print "done":wait key:end
loop
edit
tidy it up a bit
r as float
ar as float
p as float
scx=screen width()/2
scy=screen height()/2
R=75.0; ar=2.0; p=100.0
x as float
y as float
pi#=3.14
tt as float
tt=0.0
p=2*pi#
do
x=(R-ar)*cos(tt) + p*cos((R-ar)*tt/ar)
y=(R-ar)*sin(tt) - p*sin((R-ar)*tt/ar)
dot scx+x,scy+y
inc tt,.01
if tt>359.0 then print "done":wait key :end
loop
post other or better ways if you like.
Dark Physics makes any hot drink go cold.