Ask Me Help Desk

Ask Me Help Desk (https://www.askmehelpdesk.com/forum.php)
-   Other Engineering (https://www.askmehelpdesk.com/forumdisplay.php?f=561)
-   -   2D Rotation about center of mass (https://www.askmehelpdesk.com/showthread.php?t=18870)

  • Jan 26, 2006, 03:04 PM
    janguera
    2D Rotation about center of mass
    Hey Everyone!

    I've posted this question on both the physics and math sites, but I'm hoping that by fishing in all three that I might get an answer sooner! With that in mind...


    I'm trying to figure out how to calculate the resultant polar coordinates of a triangle following the triangle's 45 degree rotation about it's own center of mass. I've seen how to rotate the triangle about the center of the screen using:

    In 2D, you make (X,Y) from (x,y) with a rotation by angle t so:
    X = x cos t - y sin t
    Y = x sin t + y cos t

    ... but this only rotates the triangle with regards to the background. I want to figure out a way to find the NEW polar coordinates of the triangle after a 45 degree rotation with regards to its own center of mass. Any and all suggestions/comments are welcome!

    Joaq
  • Nov 6, 2011, 02:41 AM
    wandersciencer
    first you get the differente between each pont of the triangle and the center of it.Then rotate the new coordiantes with the rotation formula and again add (reverse the first operation) to te rotated points the coordinates of the center of the triangle: so
    x(center of masses)=(x1+x2+x3)/3;y(center of masses)=(y1+y2+y3)/3;
    x1'=x1-x;y1'=y1-y; and so on;
    x1rotated=x1'*cos(angle)-y1'*sin(angle) and y1rotated=x1'*sin(angle)+y1'*cos(angle);
    finally=> x1''=x1rotated+x ; y1''=y1rotated+y;

  • All times are GMT -7. The time now is 07:13 AM.