Results 1 to 2 of 2

Math Help - Rotating a Rectangle Help

  1. #1
    Newbie
    Joined
    Aug 2008
    Posts
    1

    Rotating a Rectangle Help

    Hello,
    I'm trying to work on rotating a rectangle for some computer code. I know the top left and right co-ordinates and the rectangle size, but I'm trying to figure out how I'd determine the relative co-ordinates of the bottom points that would be joined to create the rectangle. Is there a formula for this?

    I haven't done maths in a while so please excuse me if this is straightforward!

    Thanks
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Super Member
    Joined
    Jun 2008
    Posts
    792
    You can use a rotation matrix.

    Suppose you have a point P(x,y). Let the image point be B(x`,y`) after a rotation of \theta radians. The coordinates of the image point can be found by matrix multiplication:

    \left[ {\begin{array}{*{20}c}<br />
   {\cos{\theta}} & {-\sin{\theta}} \\<br />
   {\sin{\theta}} & {\cos{\theta}} \\<br />
\end{array}}\right]<br />
\left[ {\begin{array}{*{20}c}<br />
   {x}  \\<br />
   {y}  \\<br />
\end{array}} \right] =<br />
\left[ {\begin{array}{*{20}c}<br />
   {x'}  \\<br />
   {y'}  \\<br />
\end{array}} \right]<br /> <br />
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Replies: 6
    Last Post: June 2nd 2011, 04:56 PM
  2. Rotating two curves
    Posted in the Calculus Forum
    Replies: 3
    Last Post: December 3rd 2009, 06:01 AM
  3. Replies: 1
    Last Post: November 23rd 2009, 06:41 PM
  4. Fitting rectangle in a rectangle.
    Posted in the Geometry Forum
    Replies: 1
    Last Post: October 11th 2008, 06:31 PM
  5. Replies: 1
    Last Post: October 7th 2008, 01:18 AM

Search Tags


/mathhelpforum @mathhelpforum