Calculate distance after rotation?

2.1k Views Asked by At

I'll start off by saying that I suck at math.

I'm trying to calculate the distance between a circle and the center of the screen after rotating an image that contains that circle by $45^\circ$ in $3D$,

(The $y$ distance of the object changes as the image rotates)

enter image description here

I hope I made myself clear, thanks in advance

2

There are 2 best solutions below

15
On BEST ANSWER

Let's suppose that the projection point is on the line perpendicular to the middle of the screen (at a distance $z$) then the vertical tangent at the view point will change from $\displaystyle\frac yz$ to $\displaystyle\frac {y\,\cos(\alpha)}{z+y\,\sin(\alpha)}$ after a vertical rotation of angle $\alpha$.

This implies that $\,y\,$ will become $\ \displaystyle h(\alpha):=\frac {y\,z\,\cos(\alpha)}{z+y\,\sin(\alpha)}$.

For $\,\alpha=\frac{\pi}4\,$ you should get : $$y':=h\left(\frac{\pi}4\right)=\frac {y\,z}{y+\sqrt{2}z}$$


After rotation of $(oy)$ of an angle $\alpha$ we get following picture (from the side) :

alpha rotation

Now observe the triangle obtained and notice that : $$\frac{y\,\cos(\alpha)}{z+y\,\sin(\alpha)}=\frac{y'}z$$

0
On

I thought of a more naiive way of doing this calculation that I hope illustrates how images are really taken of things, and how that means you have to manipulate the camera to manipulate the image.

In step 1, the perspective point F and either of the other points (the centers of the planes) can be chosen arbitrarily.

Something to think about: images in our vision are really upside-down, but our brains correct them.

The projection of a point onto a plane