Jump to content

  • Log In with Google      Sign In   
  • Create Account

PastelOgre

Member Since 25 Dec 2012
Offline Last Active Jun 10 2013 06:24 AM

#5018986 How do I rotate a rectangle with the four vertices

Posted by PastelOgre on 08 January 2013 - 05:15 AM

Equation for rotating a point around a center:
(x2,y2) = resulting rotated point
(x1,y1) = original point before rotation
(xc,yc) = center of rotation
x2 = xc+(x1-xc)*cos(angle)-(y1-yc)*sin(angle)
y2 = yc+(x1-xc)*sin(angle)+(y1-yc)*cos(angle)



PARTNERS