I was just wondering how I could make a line with a line trace the outline of a circle.
So that when I press a button the line moves 2 degrees to the right but stays the right length.
Also, X2 and Y2 are stationary and don't move.
Printable View
I was just wondering how I could make a line with a line trace the outline of a circle.
So that when I press a button the line moves 2 degrees to the right but stays the right length.
Also, X2 and Y2 are stationary and don't move.
X1 = X2 + length * cos(angle)
Y1 = Y2 + length * sin(angle)
note that angle is in radians (0-2PI). To convert degrees (0-360) to radians, multiply by PI/180 (don't forget a PI=3.141593 at the start of the program)