|
-
May 17th, 2001, 12:07 PM
#1
Thread Starter
New Member
Line X1 and Y1 Follow the path of a circle
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.
-
May 17th, 2001, 01:41 PM
#2
Member
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)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|