Google Answers Logo
View Question
 
Q: Geometry > Rotation about an arbitray point ( No Answer,   1 Comment )
Question  
Subject: Geometry > Rotation about an arbitray point
Category: Science > Math
Asked by: joshreeves-ga
List Price: $10.00
Posted: 05 Jun 2005 23:19 PDT
Expires: 05 Jul 2005 23:19 PDT
Question ID: 529807
Given 2 points (x0,y0; x1,y1) and one angle (a): what formula will
determine the new location of point (x1,y1) if it were rotated about
point (x0,y0) through an angle of (a)? I need 2 formulas: "deltaX =
[something]; deltaY = [something]" where x1_original + deltaX = x1_new
and y1_original + deltaY = y1_new.
Answer  
There is no answer at this time.

Comments  
Subject: Re: Geometry > Rotation about an arbitray point
From: mnuttall-ga on 06 Jun 2005 07:45 PDT
 
This one is pretty straight forward.  I'll use matrices to derive the equations:

Process:
  Shift points so that [X0,Y0] is at [0,0]
  Rotate point [X1,Y1] about [0,0]
  Shift back to original location

To shift the points to [0,0]

[X1',Y1']=[X1,Y1]-[X0,Y0]

A general rotation matrix is:

[x2,y2]=[x1,y1]*[cosa  sina]
                [-sina cosa]

Putting the shifted points into the rotation matrix we have:

X2'=X1'cosa + Y1'sina
Y2'=-Y1'sina + Y1'cosa

Translating everything back to the original axes we end up with:

X2=(X1-X0)cosa + (Y2-Y1)sina + X1
Y2=-(X1-X0)sina + (Y1-Y0)cosa + Y1

[X2,Y2] is the final location of the point
Note this is a clockwize rotation; to rotate counterclockwize use a negative angle.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy