# S.O.S. Mathematics CyberBoard

Your Resource for mathematics help on the web!
 It is currently Sun, 19 May 2013 09:14:36 UTC

 All times are UTC [ DST ]

 Page 1 of 1 [ 8 posts ]
 Print view Previous topic | Next topic
Author Message
 Post subject: Bounding Box of a Rotated RectanglePosted: Thu, 25 Aug 2011 19:49:32 UTC
 S.O.S. Newbie

Joined: Thu, 25 Aug 2011 19:46:06 UTC
Posts: 4
I am looking to find the bounding box of a rotated rectangle. I know the top left corner of the rotated rectangle and it's width height and rotation.
Here is an image to help out.
http://bisonkick.com/math/rect.png
I am looking to find the red line in the picture.
Any help would be amazingly appreciated.

Top

 Post subject: Re: Bounding Box of a Rotated RectanglePosted: Thu, 25 Aug 2011 19:52:54 UTC
 Moderator

Joined: Wed, 30 Mar 2005 04:25:14 UTC
Posts: 12075
Location: Austin, TX
iwishiwasgoodatmath wrote:
I am looking to find the bounding box of a rotated rectangle. I know the top left corner of the rotated rectangle and it's width height and rotation.
Here is an image to help out.
http://bisonkick.com/math/rect.png
I am looking to find the red line in the picture.
Any help would be amazingly appreciated.

What information are you given? A box is more than an object, it also involves a location. In any case, it's obvious that if you know the angle of rotation of the box (modulo then you can figure out the longest distance straight across for the box, which will give you the side lengths. Add this to the location of the center of the box (presumably what it is being rotated about) and you have your box.

_________________
(\ /)
(O.o)
(> <)
This is Bunny. Copy Bunny into your signature to help him on his way to world domination

Top

 Post subject: Re: Bounding Box of a Rotated RectanglePosted: Thu, 25 Aug 2011 21:15:23 UTC
 S.O.S. Newbie

Joined: Thu, 25 Aug 2011 19:46:06 UTC
Posts: 4
I am only given info about the rotated rectangle. I know it's width and height and top left corner and rotation amount.

What I am most confused about is finding the top left corner point of the red box in the picture.

Top

 Post subject: Re: Bounding Box of a Rotated RectanglePosted: Thu, 25 Aug 2011 21:19:17 UTC
 Moderator

Joined: Wed, 30 Mar 2005 04:25:14 UTC
Posts: 12075
Location: Austin, TX
That's the easy part, if you know the initial location and the rotation around whichever axis, you can easily calculate the new location by looking at the matrix for the slide rotation applied to the original location vector.

_________________
(\ /)
(O.o)
(> <)
This is Bunny. Copy Bunny into your signature to help him on his way to world domination

Top

 Post subject: Re: Bounding Box of a Rotated RectanglePosted: Thu, 25 Aug 2011 21:47:40 UTC
 S.O.S. Newbie

Joined: Thu, 25 Aug 2011 19:46:06 UTC
Posts: 4
so how would i find the width and height of the bounding box in the end? You said it's easy but I don't really understand what you say I should do..

Top

 Post subject: Re: Bounding Box of a Rotated RectanglePosted: Fri, 26 Aug 2011 01:27:52 UTC
 Moderator

Joined: Wed, 30 Mar 2005 04:25:14 UTC
Posts: 12075
Location: Austin, TX
iwishiwasgoodatmath wrote:
so how would i find the width and height of the bounding box in the end? You said it's easy but I don't really understand what you say I should do..

Which part don't you understand? And if so, please provide some context for the problem, I'm not sure how much mathematics you know. You posted this in matrix algebra, so I assume you can do geometry and matrix operations and understand how the matrix changes an object's location.

_________________
(\ /)
(O.o)
(> <)
This is Bunny. Copy Bunny into your signature to help him on his way to world domination

Top

 Post subject: Re: Bounding Box of a Rotated RectanglePosted: Mon, 29 Aug 2011 15:43:59 UTC
 S.O.S. Newbie

Joined: Thu, 25 Aug 2011 19:46:06 UTC
Posts: 4
OK Shadow. Thank you for your help so far. I think I figure this whole thing out. And it does not need to involve matrices. Can you let me know if this is correct?
I needed to find the bounding box so I found it from (in degrees) 0- 90 then 90 - 180 and then 180 -270 and then 270 - 360.
The only one I am having trouble with is this. Can you tell me if this is correct?
It doesn't seem to work in the end but I double checked everything and it seems correct.
http://bisonkick.com/math/one80to270.png

Top

 Post subject: Re: Bounding Box of a Rotated RectanglePosted: Mon, 29 Aug 2011 16:29:12 UTC
 Moderator

Joined: Wed, 30 Mar 2005 04:25:14 UTC
Posts: 12075
Location: Austin, TX
Nothing needs to involve matrices, but it's certainly useful to have them, and in any case I'm not invested one way or another, you posted in matrix algebra so I recommended matrix techniques.

In response to your question: yes, that is the standard geometric way to find the lengths of the sides of the box.

_________________
(\ /)
(O.o)
(> <)
This is Bunny. Copy Bunny into your signature to help him on his way to world domination

Top

 Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending
 Page 1 of 1 [ 8 posts ]

 All times are UTC [ DST ]

#### Who is online

Users browsing this forum: No registered users

 You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forum

Search for:
 Jump to:  Select a forum ------------------ High School and College Mathematics    Algebra    Geometry and Trigonometry    Calculus    Matrix Algebra    Differential Equations    Probability and Statistics    Proposed Problems Applications    Physics, Chemistry, Engineering, etc.    Computer Science    Math for Business and Economics Advanced Mathematics    Foundations    Algebra and Number Theory    Analysis and Topology    Applied Mathematics    Other Topics in Advanced Mathematics Other Topics    Administrator Announcements    Comments and Suggestions for S.O.S. Math    Posting Math Formulas with LaTeX    Miscellaneous