We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpSyntax Questions › rotating a line without rotate
Page Index Toggle Pages: 1
rotating a line without rotate (Read 1173 times)
rotating a line without rotate
Jun 21st, 2009, 2:31pm
 
how can i rotate a line in its own center controlling the both points that define the line?
any idea?


thanks


Seb.
Re: rotating a line without rotate
Reply #1 - Jun 21st, 2009, 3:56pm
 
For reference:
http://en.wikipedia.org/wiki/Unit_circle

Quick summary:
X coordinate = Radius * cos(angle)
Y coordinate = Radius * sin(angle)
will give you a point on a circle.
Page Index Toggle Pages: 1