Results 1 to 2 of 2

Thread: Rotating a Rectangle Help

  1. #1
    Aug 2008

    Rotating a Rectangle Help

    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!

    Follow Math Help Forum on Facebook and Google+

  2. #2
    Super Member
    Jun 2008
    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: Jun 2nd 2011, 05:56 PM
  2. Rotating two curves
    Posted in the Calculus Forum
    Replies: 3
    Last Post: Dec 3rd 2009, 07:01 AM
  3. Replies: 1
    Last Post: Nov 23rd 2009, 07:41 PM
  4. Fitting rectangle in a rectangle.
    Posted in the Geometry Forum
    Replies: 1
    Last Post: Oct 11th 2008, 07:31 PM
  5. Replies: 1
    Last Post: Oct 7th 2008, 02:18 AM

Search Tags

/mathhelpforum @mathhelpforum