7

I am trying to find the angle of tilts of a screen using projection of a circle from a source $S$. The light beam falls on the photo screen to expose it and what we get is an ellipse with major axis $a$ and minor axis $b$. The light beam is in the form of a cone so what we get is essentially an ellipse on the screen.

Drawing

The screen tilts with angle $\alpha$ to the vertical axis $y$ and $\beta$ with the horizontal axis $x$. Rotation about the $z$ axis does not affects the shape of the ellipse so it can be ignored for the moment.

The transformed plane can be given by:

$\begin{bmatrix}x_1\\y_1\\z_1\end{bmatrix}=\begin{bmatrix}1&0&0\\0&\cos\alpha&\sin\alpha\\0&-\sin\alpha&\cos\alpha\end{bmatrix}\cdot\begin{bmatrix}\cos\beta&0&-\sin\beta\\0&1&0\\\sin\beta&0&\cos\beta\end{bmatrix}\cdot\begin{bmatrix}\cos\gamma&-\sin\gamma&0\\\sin\gamma&\cos\gamma&0\\0&0&1\end{bmatrix}\cdot\begin{bmatrix}x\\y\\z\end{bmatrix}$

so ignoring $z$ and setting $\gamma = 0$ we get, $$\ x_1=x\cos\beta \ + \ y\sin\alpha \sin\beta $$ and $$ \ y_1=\ y\cos\alpha$$

Now on the screen $P$ is vertical axis and $Q$ is the horizontal axis, $\theta$ is the angle of semi-major axis with horizontal- $Q$. To get the same ellipse as in the projection we can use the shear transformation of an ellipse on the screen:

Rotation transformation gives:

$$P_1 = P\cos\theta \ - \ Q\sin\theta$$

$$P_2 = P\sin\theta \ + \ Q\cos\theta$$

substituting $P_1$ & $P_2$ in ellipse equation with $a$ & $b$ as major and minor axis followed by vertical shear transformation we can get the limits to the ellipse w.r.t angle $\theta$, which are:

$\sqrt{a^2\sin^2\theta +b^2\cos^2\theta } \ $ for the horizontal axis $Q$

$\sqrt{b^2\sin^2\theta +a^2\cos^2\theta } \ $ for the vertical axis $P$

After being done with that, we do the same procedure using $x_1$ and $y_1$ to apply the transformation to a circle using equation of a circle. After the shear transformation of those equation we get the equations giving the maximum limit:

$\sqrt{a^2\cos^2\alpha +a^2\sin^2\alpha \sin^2\beta } \ $ for horizontal axis

$\sqrt{a^2\cos^2\alpha }\ $ for vertical axis

For getting $\alpha$ and $\beta$ in terms of $\theta$ we use the above equations as the maximum extent of both the cases must be equal to get the same ellipse.

so:

$\sqrt{a^2\cos^2\alpha +a^2\sin^2\alpha \sin^2\beta }=\sqrt{b^2\cos^2\theta +a^2\sin^2\theta }$

and

$\sqrt{a^2\cos^2\alpha }=\sqrt{a^2\cos^2\theta +b^2\sin^2\theta }$

Solving these equation we get:

$$\alpha =\cos^{-1}\sqrt{\cos^2\theta +\frac{b}{a^2}^2\sin^2\theta }$$

$$\beta =\sin^{-1}\sqrt{\frac{\cos^2\theta \left(\frac{b^2}{a^2}-1\right)}{\sin^2\theta \left(1-\frac{b^2}{a^2}\right)-1}}$$

It turns out it is not giving the correct $\alpha$ & $\beta$ values with $\theta$ but when viewed from the point $S$ along the $z$ axis we get the following image in which the small circle is the circle that is being projected and the bigger ellipse(which would appear as a circle) is the projected ellipse on the screen when viewed from point $S$.

enter image description here

Using the angle $\eta$, that is the angle between the vertical axis and the ellipse major axis when viewed from point $S$, in the above angle equations ($\alpha, \beta$) in the place of $\theta$ and keeping the other parameters same, we observe that it gives the correct value of $\alpha$ & $\beta$

Now in general case we cannot use this method ($\eta$) to find the angles as we would just have the screen photo image of the ellipse. Can this $\eta$ be related to $\theta$ by any means or what can be done to change the angles equation to get the correct value?

I am using a software to simulate this so I can see from the source position and get the $\eta$ angle but in practical case it can not be done as we will just have the photo of the ellipse. This is being done to correct the photo(screen) plane using $\alpha$ & $\beta$ so that it can reach the ideal state if being parallel to the plane of the circle.

radk
  • 133
  • hope all questions in SE are like this – Abr001am Jun 05 '16 at 19:31
  • I'd like some more detailed abstract description before you start into the computations. You have a light source $S$, a circle and your final plane. Is the light source located on the axis of symmetry of the circle, thus resulting in a circular cone, or is that cone elliptic? Is the angle you want the angle between the image plane and the plane of the circle? Or do you want angles against some coordinate frame, and if so, what coordinates to you already have? – MvG Jun 06 '16 at 12:30
  • @MvG Yes as in the image, the source S is in the axis of the symmetry of the circle which is Z axis and results in a circular cone. The angle $\alpha$ & $\beta$ is what I am trying to compute to find the screen orientation and how much to correct it to reach the ideal position, which would be $\alpha$ & $\beta$ both being 0 and parallel to the plane of the circle. The only information from this setup we can get is the ellipse image, the major-minor axis and the angle $\theta$ (angle between major axis of ellipse and screen horizontal Q). – radk Jun 06 '16 at 12:54
  • I think, if I parsed your question correctly, that one of the main problem is the following: in your drawing you seem to have implicitly assumed that for the ellipse on the screen, its center would be on the intersection of your screen with the Z axis. That is not true. See http://math.stackexchange.com/questions/1332189/questions-on-the-relation-of-the-axis-of-a-cone-to-its-conic-sections – Willie Wong Jun 06 '16 at 16:50
  • @Willi wong Yes, I am aware of this, it's just in the image that it appears this way, but I assumed that even if the center of major-minor axis intersection does not lie on Z axis it should make same angle with the horizontal of the screen. So, essentially $\theta$ would be same if it lies on Z or not. – radk Jun 06 '16 at 17:10
  • Question: so let me see if I get this straight. You are given a screen, marked with an $x$ and a $y$ axes. On this screen you have the image of an ellipse. You can find out the ratio $a/b$ for the major/minor axes, and you can find out the angle $\theta$ between the $x$-axis and the major axis of the ellipse. So far is it correct? – Willie Wong Jun 06 '16 at 17:42
  • Now, what is it you want to output? I assume you don't already have a universal coordinate system available, otherwise you can just align to it. So I assume what you can do is rotate the screen relative to its own $x$ and $y$ axes to correct for the error, is that correct? And you want to first rotate it with angle $\alpha$ about the $x$ axis, and then angle $\beta$ about the then $y$ axis, so that after the rotation you get the correct alignment. Is that correct? – Willie Wong Jun 06 '16 at 17:46
  • @WillieWong Yes, that is exactly what I want to do. – radk Jun 06 '16 at 18:11

1 Answers1

1

Okay then. One way to achieve what you want is via the following:

  1. First use a combination of $x$ and $y$ rotations to align the $x$ axis with the minor axis of the ellipse.
  2. Then rotate about the $x$-axis by angle $\phi$.

(Remark: the following paragraph is new)
To find out the angle $\phi$, we start by thinking about what happens if we wrote a flat screen about its $x$-axis by an angle $\phi$. (An important factor that I forgot to include earlier is the shape of the original cone.) Suppose that the cone you are intersecting comes from the graph $z = \sqrt{\sigma(x^2 + y^2)}$. When $\sigma = 1$ we have a circular cone with a right-angle aperture. A rotation about the $x$-axis by angle $\phi$ results in the ellipse on the screen satisfying the equation $$ \frac{1}{\sigma}(x \sin \phi + c)^2 = \cos^2\phi x^2 + y^2 $$ This gives the ratio of the semi-minor/major axes to be $$ \frac{b^2}{a^2} = \cos^2 \phi - \frac{1}{\sigma} \sin^2\phi $$ (This missing factor of $\sigma$ is why the original result was off by so much.)

From the data provided by the OP in the comments I infer that the number $\sigma$ is somewhere between 90 and 110 in those examples.
(end new stuff)

What we need to do is to rotate the axes to effect step 1. To do so we use the well-known relation that we can get a rotation about the $z$ axes by conjugating a rotation in the $x$ axis with one in the $y$ axis. So step 1 can be attained by

  1. First rotating about the $x$ axis by $\pi/2$ radians.
  2. Rotating about the $y$ axis by $\theta - \pi/2$ radians (where $\theta$ is the angle from the $x$ axis to the major axis)
  3. Rotate about the $x$ axis by $-\pi/2$ radians.

So the final answer is $$ X(\pi/2) Y(\theta - \pi/2) X(\phi - \pi/2) $$


Another way is to keep track of where the $z$ axis goes. Since we are looking at intrinsic rotations, what we should do is to first compute the product

$$ X(\alpha) Y(\beta) = \begin{pmatrix} * &* & \sin \beta \\ * & * & - \sin\alpha \cos\beta \\ * & * & \cos\alpha\cos\beta\end{pmatrix} $$

the last column of which represents where the $z$-axis ends up after the transformation. We compare this to

$$ Z(\theta - \pi/2) X(\phi) = \begin{pmatrix} * &* & \sin (\theta - \pi/2) \sin\phi \\ * & * & - \cos(\theta- \pi/2)\sin\phi \\ * & * & \cos\phi\end{pmatrix} $$

where $\theta$ and $\pi$ are as before. Then we can simply solve for $\alpha$ and $\beta$ from the three equalities.


You will notice that the first answer requires two rotations about the $x$ axis, while the second only one. The difference is that in the first we insist on lining up the $x$ axis with the minor axis of the ellipse. In the second we don't. The two answers differ by a Z rotation which should be immaterial when you just want to line up the plane of the screen with the light source.


More new stuff:

Let's make the assumption that $\sigma = 100$. First consider the data where $\theta = 0$ and $a = 48.722$ and $b = 42.117$ as in this comment. Solving the above equation for $\phi$ we get

$$\cos\phi = \sqrt{ \frac{1 + \frac{\sigma b^2}{a^2}}{\sigma + 1}} = 0.86588\ldots $$

or

$$ \phi \approx 30.0165^\circ$$

and $\theta = 0$ implies $\alpha = 0$ and hence $\beta = \phi$. So far so good.

Next, let's do the case $a = 52.548$, $b = 42.143$, $\theta = 70.269^\circ$ as in this comment. The same expression above gives

$$\cos\phi = \sqrt{ \frac{1 + \frac{\sigma b^2}{a^2}}{\sigma + 1}} = 0.80419\ldots $$

or

$$\phi \approx 36.468^\circ$$

From the above discuss we should have

$$ \sin \beta = \cos\theta \sin \phi = 0.2007\ldots $$

or

$$ \beta \approx 11.58^\circ $$

similarly solving for $\alpha$ we get

$$ \alpha \approx 34.826^\circ $$

These are pretty close to the values of $\beta = 14$ and $\alpha = 34$ given in the set-up of the problem.

(I remark here that with $\alpha = 34$ and $\beta = 14$, and $\sigma = 100$, the predicted values of $a, b, \theta$ are supposed to be

$$ \frac{b^2}{a^2} = 0.64355\ldots $$

[compare with 65.3189... from the given data] and

$$ \theta \approx 65.9693^\circ $$

[compare with 70.269 from the data]. The discrepancy can easily be due to measurement errors, or due to that I only inferred $\sigma$ from the data [disclosure: I don't know how the OP's simulation software works]. But note that uncertainty in $\sigma$ cannot effect the value of $\theta$, only the value of $\phi$.)

Willie Wong
  • 73,139
  • Thanks for the insight and the efforts but it also seems to give wrong values or maybe I did not interpret your answer correctly. Let me give some results: $a = 52.548, \ \ b = 42.143, \ \ \theta = 70.269^o$. The $\phi$ value as you said is $ \pm \frac12 \arccos \frac{b^2}{a^2} $ so $\phi=24.984^o$ so we get $\beta=-8.19^o$ which must actually be $-14^o$. So something seems to be going wrong here – radk Jun 07 '16 at 14:13
  • How did you get "$\beta$ must actually be -14 degrees"? Did you get this from setting up the screen yourself? How did you set the screen up? – Willie Wong Jun 07 '16 at 14:50
  • More precisely: if you originally set-up the screen by first rotating $\alpha'$ about the $x$ axis, and then rotating $\beta'$ about the $y$ axis, then to make it flat again generally $(\alpha,\beta) \neq (\alpha',\beta')$, this is due to the $x$ and $y$ rotations not commuting. – Willie Wong Jun 07 '16 at 14:59
  • Hmmm.. but that doesn't seem to be enough to account for the difference. I think I must be not correctly understanding your experimental set-up. Can you edit your question to describe exactly the mechanical set-up of your scree, as well as how you arrived at the "results"? – Willie Wong Jun 07 '16 at 15:21
  • As I said I am using a simulating software in which I initially give the plane angles myself then do the projection to find these values. You can find an image here http://i.stack.imgur.com/6ychh.jpg. Yes, the order of the rotation is also an issue so what could be a solution to that? – radk Jun 07 '16 at 15:23
  • @kira: if you want to find out the solution, then you have to find out exactly what the plane angles mean in your software! If your software sets up the plane angles by rotation in the universal coordinate system (and not the one attached to the screen), then you will have a big difference. – Willie Wong Jun 07 '16 at 15:30
  • @kira: is there a way to have your simulation software show how it measures the angles $\alpha$ and $\beta$? The image you attached showed the parameters $a, b, \theta$, but did not show the "expected results" of -14 degrees and where it was measured. – Willie Wong Jun 07 '16 at 15:31
  • Here you can find some images to get a clear view: side view: http://i.stack.imgur.com/TVPFT.jpg General view: http://i.stack.imgur.com/nin8A.jpg Let's ignore -ve sign for the moment, it can be changed so its $14^o$ – radk Jun 07 '16 at 16:25
  • @kira: can you do me a favour and run your simulation with $\alpha$ being 0 and $\beta$ being 30 degrees, and tell me what $a, b, \theta$ you get? I want to double check a few things. – Willie Wong Jun 07 '16 at 17:05
  • ok I will do that – radk Jun 07 '16 at 17:16
  • Here you can find the image: http://i.stack.imgur.com/GcGg3.jpg $a=48.722 \ \ b=42.117 \ \ \theta=0^o$. The image shows the view parallel to the screen plane and $\theta$ is not mentioned in the image as the angle between major axis and horizontal(Q) is 0 – radk Jun 07 '16 at 17:39
  • Okay, this confirms a few things. Let me edit it into the answer. – Willie Wong Jun 07 '16 at 17:56
  • @kira: can you confirm that the cone you are intersecting with (the light beam so to speak) has a $\sigma$ of around 100 as predicted in the answer above? (in terms of slope it should be 10 z units for 1 x units) – Willie Wong Jun 07 '16 at 18:37
  • I think it has something to do with the uncertainity in $\sigma$ but the software seems to have been generating a right circular cone only. You can see the image here about the cross-section of the cone: http://i.stack.imgur.com/IFf07.jpg – radk Jun 08 '16 at 06:47
  • @kira: sorry; I was tired and misusing terminology. I didn't mean right circular cone. I meant circular cone with right-angle aperture. Sorry for the confusion. And indeed, from the picture you showed $\sigma = (284.818/29.936)^2 = 90.52$. – Willie Wong Jun 08 '16 at 13:12
  • Although the amount of tilt can be recovered from the axis lengths, they are even functions of the tilt angle, so the direction of this tilt can’t be. (The tilt axis is of course parallel to the minor axis). To disambiguate this, you’ll need to determine the direction in which the ellipse center is shifted from the cone axis. If this can’t be measured directly, compare the widths of the light ring where it intersects the major axis: the wider side is farther from the camera. – amd Jan 15 '17 at 11:00