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 $\displaystyle \theta$ radians. The coordinates of the image point can be found by matrix multiplication:

    $\displaystyle \left[ {\begin{array}{*{20}c}
    {\cos{\theta}} & {-\sin{\theta}} \\
    {\sin{\theta}} & {\cos{\theta}} \\
    \left[ {\begin{array}{*{20}c}
    {x} \\
    {y} \\
    \end{array}} \right] =
    \left[ {\begin{array}{*{20}c}
    {x'} \\
    {y'} \\
    \end{array}} \right]

    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

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

Search Tags

/mathhelpforum @mathhelpforum