moving in an arc
Author |
Message |
rollerdude
|
Posted: Thu Mar 03, 2005 10:18 pm Post subject: moving in an arc |
|
|
a while ago, i logged on and sombody asked about moving somthing in an arc like motion- take the sun for example
this is for a screen set to 300 by 200
[code]
setscreen ("nocursor,noecho,graphics:300;200")
loop
for i : 1 .. 300 by 5
Draw.FillOval (i, round (100 * sin (i * 0.0105)) + 1, 10, 10, yellow)
Draw.Dot (i, round (100 * sin (i * 0.0105)) + 1, black)
delay (100)
Draw.FillOval (i, round (100 * sin (i * 0.0105)) + 1, 10, 10, white)
end for
end loop
[/code]
the dot shows the point that is plotted to make the circle
you'll have to fiddle around with the '100' and the decimal to suit your screen, however, leave all the 'sin' s in there and the 'i's in there too
enjoy
the rollerdude |
|
|
|
|
|
Sponsor Sponsor
|
|
|
person
|
Posted: Fri Mar 04, 2005 4:27 pm Post subject: (No subject) |
|
|
1) post in that thread if u have something to say
2) the problem has been solved
3) this should go into the tutorial section
4) use code tags (i see that u have but it didnt work...so please learn) |
|
|
|
|
|
|
|