Find the rotation of the object?

436 Views Asked by At

enter image description here

Image 1: The object's original height and width are 9 and 4. Here the object is not tilted, so the bounding box would cover the same dimension.

Image 2: If we tilt the object, the bounding box, as you can observe from the image, has the height and width of 10 and 8.

From this information, can we find out how much degree is the object rotated in the second image?

4

There are 4 best solutions below

3
On BEST ANSWER

enter image description here

As you can see, $\triangle ABC \sim \triangle BED$

So we have

$\frac{BC}{AB} = \frac{DE}{BE}$

$BC = \sqrt{16 - x^2}$

$\displaystyle \frac{\sqrt{16 - x^2}}{4} = \frac{8-x}{9}$

Squaring and solving the quadratic, we get $x \approx 3.4516$

Angle by which the object has been rotated is

$\angle BAC = \arccos \frac{3.4516}{4} \approx 30.6^0$

EDIT:

On the comment that the height does not add up to $10$, it will not. When the box width is $8$ due to rotation, the required height will be $\approx 9.78$ and so if the box height is $10$, it will have some room on the top. Please see below diagram that explains when the required height will be maximum.

enter image description here

The maximum required height will be the length of the diagonal and will be the case when the diagonal $AE$ is vertical.

So the maximum required height = $\sqrt{9^2 + 4^2} \approx 9.85$

This happens when we rotate by angle $23.95^0 (= \arctan \frac{4}{9})$. The required width at this point is $\approx 7.31$.

Please also consider that as we keep rotating, there will be a point $(90^0 - 23.95^0)$ when the required width is $9.85$ and the required height is $7.31$. Given the dimension of the object, you will never need box to go beyond $9.85$ on either side (width or height).

Here is a plot of how width and height of the box will change with the angle of rotation between $(0 \leq \theta \leq \frac{\pi}{2}) \,$ which is taking it from the current vertical position to the horizontal position. As you can see, at angle of rotation of $45^0$, the box requires the same width and height of $\approx 9.2$.

enter image description here

0
On

ANSWER: NO REAL ANGLES SATISFY ALL CONSTRAINTS, PROF GAVE YOU BAD NUMBERS

The picture, due to symmetry there are 4 unknowns: a,b and x,y Where a and b are the sides of the big tirangle and x,y are the sides of the little triangles.

We then have five equations: $$x+b=10$$ $$a+y=8$$ $$a^2 + b^2 = 9^2$$ $$x^2 +y^2 = 4^2$$ $$ \frac{a}{x} = \frac{b}{y}$$

This is five equations and four unknowns, you can solve this and... you get that there are no solutions!?? WUT!? https://www.wolframalpha.com/input/?i=Solve%5B%7Bx%2Bb%3D%3D10%2Ca%2By%3D%3D8%2Ca%5E2%2Bb%5E2%3D%3D9%5E2%2Cx%5E2%2By%5E2%3D%3D16%2Cx%2Fa%3Dy%2Fb%7D%2C%7Bx%2Cy%2Ca%2Cb%7D%5D

So I went digging to figure out with values do satisfy this, it looks like you have some bad numbers, $\sqrt{9^2 + 4^2} \approx 9.8 < 10$, so no real rotation angle will allow it cover a distance of 10. Tell your prof to do their own HW before they assign it!! haha

visualization of diagram disection.

0
On

You need to solve the system of equations

$$\begin{cases}W=w\cos\theta+h\sin\theta,\\H=w\sin\theta+h\cos\theta.\end{cases}$$

In fact a single equation is enough, and there is a compatibility condition, namely

$$W^2+H^2=w^2+h^2+2wh\sin2\theta,\\W^2-H^2=(w^2-h^2)\cos2\theta$$

and

$$\left(\frac{W^2+H^2-w^2-h^2}{2wh}\right)^2+\left(\frac{W^2-H^2}{w^2-h^2}\right)^2=1.$$

It is not really verified by your data. (By the way, the diagonal of the rectangle is $\sqrt{4^2+9^2}<10$ and the second equation is not possible.)


To solve the first equation, write

$$(W-w \cos\theta)^2=h^2(1-\cos^2\theta)$$ and solve this quadratic equation in $\cos\theta$.

0
On

Let $\theta$ be the angle that the object is rotated anticlockwise. $\theta$ is the acute angle that the $9$-side of the object makes with the vertical bound, and is also the acute angle that the $4$-side of the object makes with the horizontal bound.

Then consider the vertical side of the bounding box,

$$4 \sin \theta + 9 \cos \theta = 10$$

And consider the horizontal side of the bounding box,

$$9\sin \theta + 4 \cos \theta = 8$$

These are two linear equations in two unknows $\cos \theta$ and $\sin \theta$. Solve for them to find $\theta$.

(If the results are inconsistent that $\cos ^2\theta + \sin^2\theta \ne 1$, then the dimensions of the object or the bounding box may be wrong)


According to image 2, the vertical bounds are not tight bounds and there may be spaces above and below the object. So this section considers only the horizontal bound:

$$9\sin \theta + 4 \cos \theta = 8$$

Let $L$ be positive number and $\phi$ be an acute angle, such that $L\cos\phi = 9$ and $L\sin\phi = 4$. Solve $L$ and $\phi$ by

$$\begin{align*} L &= \sqrt{(L\cos\phi)^2 + (L\sin\phi)^2}\\ &= \sqrt{9^2+4^2}\\ &= \sqrt{97}\\ \sin\phi &= \frac 4L\\ \cos \phi &= \frac9L\\ \end{align*}$$

The equation for the horizontal bound becomes

$$\begin{align*} (L\cos\phi) \sin\theta + (L\sin\phi)\cos\theta &= 8\\ L\sin(\theta+\phi) &= 8\\ \sin(\theta+\phi) &= \frac 8L\\ \cos(\theta+\phi) &= \frac{\sqrt{L^2-8^2}}L= \frac{\sqrt{33}}{L}\\ \sin\theta &= \sin[(\theta+\phi)-\phi]\\ &= \sin(\theta+\phi)\cos\phi - \cos(\theta+\phi)\sin\phi\\ &= \frac 8L\cdot \frac9L - \frac{\sqrt{33}}{L}\cdot\frac{4}{L}\\ \theta &= \arcsin\frac{72-4\sqrt{33}}{97} \end{align*}$$

The geometric meaning is that $L$ is the length of the object's diagonal, and $\phi$ is the angle between a $9$-side and a diagonal of the object.