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

Username:   Password: 
 RegisterRegister   
 line moves in a circle formation
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
msimard8




PostPosted: Fri Apr 29, 2005 5:33 pm   Post subject: line moves in a circle formation

How do you make a line move around in a circle. (like how the minute hand moves around a clock)

right now my code is far from right

code:
    for c : 1 .. 200

        drawline (140, 140, 180 - c, 140 - c, grey)
        delay (10)
        drawline (140, 140, 180 - c, 140 - c, 0)
    end for


thanks
Sponsor
Sponsor
Sponsor
sponsor
Delos




PostPosted: Fri Apr 29, 2005 8:10 pm   Post subject: (No subject)

Easiest way would be in incorporate sine and cosine. This will allow you to draw objects at varying angles with respect to some centre. Think trignometry.
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: