Computer Science Canada Analog 60 second timer- How to make the hand rotate |
Author: | mballaz [ Sun Apr 05, 2009 3:06 pm ] |
Post subject: | Analog 60 second timer- How to make the hand rotate |
Hi, i'm new to turing and i was wondering how i can make a hand on the 60 second analog timer rotate if the center of the clock would be at the center of the screen. the size of the circle doesn't really matter. Thanks |
Author: | Tony [ Sun Apr 05, 2009 3:10 pm ] |
Post subject: | RE:Analog 60 second timer- How to make the hand rotate |
You know one point (center), length of the hand, and the angle (time). Calculate the location of the second point, and draw a line in between. |
Author: | saltpro15 [ Sun Apr 05, 2009 3:11 pm ] |
Post subject: | Re: Analog 60 second timer- How to make the hand rotate |
use for loops and the drawline command |
Author: | tjmoore1993 [ Sun Apr 05, 2009 3:18 pm ] |
Post subject: | Re: RE:Analog 60 second timer- How to make the hand rotate |
Tony @ Sun Apr 05, 2009 3:10 pm wrote: You know one point (center), length of the hand, and the angle (time). Calculate the location of the second point, and draw a line in between.
360 / 60 = 6 1 second = 6 degrees Equation(Linear) D=6s D=6(60) D=360 60=6s s=6/60 s=10 |
Author: | mballaz [ Sun Apr 05, 2009 4:33 pm ] |
Post subject: | Re: Analog 60 second timer- How to make the hand rotate |
i was hoping it would be like the rotating house example, so that i wouldn't need to redraw the line |
Author: | DanielG [ Sun Apr 05, 2009 5:05 pm ] |
Post subject: | RE:Analog 60 second timer- How to make the hand rotate |
there are probably commands you can use, however, the things mentioned above combined with simple trig should be more than enough. |
Author: | Zren [ Mon Apr 06, 2009 3:03 pm ] |
Post subject: | Re: Analog 60 second timer- How to make the hand rotate |
mballaz @ Sun Apr 05, 2009 4:33 pm wrote: i was hoping it would be like the rotating house example, so that i wouldn't need to redraw the line
So you would rather redraw a picture? Either way, to animate something you'll have to redraw something. |