Results 1 to 2 of 2

Thread: Line X1 and Y1 Follow the path of a circle

  1. #1

    Thread Starter
    New Member
    Join Date
    May 2001
    Posts
    1

    Question 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.

  2. #2
    Member Stef's Avatar
    Join Date
    May 2001
    Posts
    41
    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
  •  



Click Here to Expand Forum to Full Width