Results 1 to 7 of 7

Math Help - Finding scale of rectangle inside larger rotated rectangle

  1. #1
    Newbie
    Joined
    Sep 2009
    Posts
    4

    Finding scale of rectangle inside larger rotated rectangle

    Apologies if I'm poor at describing this problem.

    I have a rectangle, A, of known size, that starts aligned to the x/y axes, and can rotate around its centre point.

    For any given angle of rotation, I need to determine the maximum dimensions of a second rectangle, B, that:

    - is inscribed inside A
    - maintains the same proportions as A
    - maintains alignment to the x/y axes


    So, here A (the black rectangle) has been rotated through 30 degrees (the red rectangle). How do I determine the maximum size of B (the blue rectangle)?

    Many thanks for any help.
    Follow Math Help Forum on Facebook and Google+

  2. #2
    MHF Contributor
    Joined
    Dec 2007
    From
    Ottawa, Canada
    Posts
    3,110
    Thanks
    68
    Good problem! My answer: I don't know

    BUT I'm pretty sure B needs to end up as a square (a square is a rectangle).
    Follow Math Help Forum on Facebook and Google+

  3. #3
    MHF Contributor
    Opalg's Avatar
    Joined
    Aug 2007
    From
    Leeds, UK
    Posts
    4,041
    Thanks
    7
    The vertices of the blue rectangle will lie on the diagonals of the black rectangle (green lines on the attachment). So all you have to do is to see where the green lines intersect the red lines, choose the two such intersections that are closer to the centre of the rectangle, and take those to be opposite vertices of the blue rectangle.

    If the black rectangle has sides on the lines x=\pm a and y=\pm b, where a>b, and the red rectangle is obtained by rotating it through an angle θ (between 0 and π/2), then I think that the vertices of the blue rectangle will be at \Bigl(\pm\frac{ab}{a\sin\theta+b\cos\theta}, \pm\frac{b^2}{a\sin\theta+b\cos\theta}\Bigr) (but I haven't checked that calculation carefully).
    Attached Thumbnails Attached Thumbnails Finding scale of rectangle inside larger rotated rectangle-math.jpg  
    Follow Math Help Forum on Facebook and Google+

  4. #4
    Newbie
    Joined
    Sep 2009
    Posts
    4
    Opalg,

    Plotted on a graph, that looks correct, I'll do the programming tomorrow to make sure. Thanks for the help - its depressing how little math I can do after 10 years out of school!
    Follow Math Help Forum on Facebook and Google+

  5. #5
    Newbie
    Joined
    Sep 2009
    Posts
    4
    I really should be able to figure this out by myself, but...

    What is the formula when a < b?
    Follow Math Help Forum on Facebook and Google+

  6. #6
    Newbie
    Joined
    Sep 2009
    Posts
    4
    Sorted, when a < b:

    \Bigl(\pm\frac{a^2}{b\sin\theta+a\cos\theta}, \pm\frac{ab}{b\sin\theta+a\cos\theta}\Bigr)
    Follow Math Help Forum on Facebook and Google+

  7. #7
    Newbie
    Joined
    Jun 2011
    From
    Brisbane Australia
    Posts
    1

    Practical example

    the above formula was used in an ImageMagick discussion forum to develop a video rotation sequence.
    the coordinates was used to define a 'scaling factor' enlarging an rotated image so that it completely defines the images original bounds.

    ImageMagick &bull; View topic - optimizing 'convert' speed
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Maximise a rectangle inside a triangle
    Posted in the Calculus Forum
    Replies: 3
    Last Post: May 20th 2010, 03:16 PM
  2. Triangle inside rectangle
    Posted in the Math Challenge Problems Forum
    Replies: 2
    Last Post: November 20th 2009, 05:41 PM
  3. Rectangle inside semicircle
    Posted in the Pre-Calculus Forum
    Replies: 3
    Last Post: October 25th 2008, 05:02 PM
  4. Replies: 1
    Last Post: September 10th 2008, 02:59 PM
  5. Rotated rectangle
    Posted in the Trigonometry Forum
    Replies: 3
    Last Post: April 22nd 2008, 01:21 PM

Search Tags


/mathhelpforum @mathhelpforum