S.O.S. Mathematics CyberBoard

Your Resource for mathematics help on the web!
It is currently Fri, 24 May 2013 12:30:10 UTC

All times are UTC [ DST ]




Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: Bounding Box of a Rotated Rectangle
PostPosted: Thu, 25 Aug 2011 19:49:32 UTC 
Offline
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
 Profile  
 
 Post subject: Re: Bounding Box of a Rotated Rectangle
PostPosted: Thu, 25 Aug 2011 19:52:54 UTC 
Offline
Moderator
User avatar

Joined: Wed, 30 Mar 2005 04:25:14 UTC
Posts: 12103
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 {\pi\over 2} 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
 Profile  
 
 Post subject: Re: Bounding Box of a Rotated Rectangle
PostPosted: Thu, 25 Aug 2011 21:15:23 UTC 
Offline
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
 Profile  
 
 Post subject: Re: Bounding Box of a Rotated Rectangle
PostPosted: Thu, 25 Aug 2011 21:19:17 UTC 
Offline
Moderator
User avatar

Joined: Wed, 30 Mar 2005 04:25:14 UTC
Posts: 12103
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
 Profile  
 
 Post subject: Re: Bounding Box of a Rotated Rectangle
PostPosted: Thu, 25 Aug 2011 21:47:40 UTC 
Offline
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
 Profile  
 
 Post subject: Re: Bounding Box of a Rotated Rectangle
PostPosted: Fri, 26 Aug 2011 01:27:52 UTC 
Offline
Moderator
User avatar

Joined: Wed, 30 Mar 2005 04:25:14 UTC
Posts: 12103
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
 Profile  
 
 Post subject: Re: Bounding Box of a Rotated Rectangle
PostPosted: Mon, 29 Aug 2011 15:43:59 UTC 
Offline
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
 Profile  
 
 Post subject: Re: Bounding Box of a Rotated Rectangle
PostPosted: Mon, 29 Aug 2011 16:29:12 UTC 
Offline
Moderator
User avatar

Joined: Wed, 30 Mar 2005 04:25:14 UTC
Posts: 12103
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
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users


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

Search for:
Jump to:  
Contact Us | S.O.S. Mathematics Homepage
Privacy Statement | Search the "old" CyberBoard

users online during the last hour
Powered by phpBB © 2001, 2005-2011 phpBB Group.
Copyright © 1999-2013 MathMedics, LLC. All rights reserved.
Math Medics, LLC. - P.O. Box 12395 - El Paso TX 79913 - USA