Hey everyone!
I hope you are all doing well.
Here's the scenario...
Starting at the top of a circle and going counter-clockwise, I would like to...
Plot a filled dot at the top of the circle (using a radius of 1, then on an X-Y plane, center of circle at (0,0) that dot would be centered at (0,1)).
Determine at random how far along the circle the new dot will go, counter-clockwise.
Erase the previously drawn dot.
Plot the new dot.
Continue until the dot has passed through (-1,-1) and reached (0,-1).
Sort of like drawing a ball on a roulette wheel, but only one-half of a complete rotation, starting at the 12-o'clock position and going backwards to the 6-o'clock position.
I realize that the CIRCLE and PSET commands are in order here, and while I can determine the start and stop coordinates, I am having a heck of a time wrapping my head around the rest of it. SIN and COS are long-forgotten trig functions, and I suspect I am using them to solve this...
Anybody have an idea here?
Thank you in advance!
Edited -
Using this...
Screen 12
Const Pi = 3.1415926
Circle (325, 225), 180, 6
Line (325, 225)-(x, y), 0
For j = 1 To 360
Input "Enter value for point:"; s
x = Int(Sin(s / 180 * Pi) * 180) + 325
y = Int(Cos(s / 180 * Pi) * 180) + 225
Line (325, 225)-(x, y), 15
Next j
- I bulldozed my way to learn that if s = 90, that code will draw a line from (0,0) to (1,0)
So, when s = 180, the result is a line from (0,0) to (0,1). Yay.
And, when s = 0 or 360, the result is a line from (0,0) to (0,-1). Yay.
Accordingly, tomorrow, I have something to work on. Any suggestions are welcome, but I think I figured out one route.
All the best, everyone!