Computer Science Canada

line moves in a circle formation

Author:  msimard8 [ 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

Author:  Delos [ Fri Apr 29, 2005 8:10 pm ]
Post 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.


: