Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 moving in an arc
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
rollerdude




PostPosted: 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
Sponsor
sponsor
person




PostPosted: 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)
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 2 Posts ]
Jump to:   


Style:  
Search: