- #1
Thomas Kundera
- 11
- 0
AS: If this is not the right place to ask this question, please let me know where I could try. Thanks.
AS: I had to validate the fact I used the template to post my assignment, however I didn't (but it wouldn't post otherwise - btw it's not an "assignment").
Hello everyone.
I need help with a problem I have and couldn't find the error in made in it.
The goal is to compute the shape of the Earth curvature as saw by a camera.
First, I computed the shape of the horizon itself.
Using the attached figure for notation.
I found a circle of equation:
\begin{equation}
\left\{ \begin{array}{l}
x^2 + z^2 = l^2\\
y = h'
\end{array} \right.
\end{equation}
With
$$h' = \frac{rh}{r + h}$$
and $$ l = r \frac{\sqrt{h (2 r + h)}}{r + h} $$
Then I define an ideal pinhole camera:
The hole is at $$P(0,h,0)$$ (yes, the projection plane is front, but apart of a sign, shouldn't change anything).
I found:
$$
M (x, y, z) \Rightarrow M' \left\{ \begin{array}{l}
x' = \varepsilon x / z\\
y' = \frac{y - h}{z} \varepsilon + h\\
z' = \varepsilon
\end{array} \right. $$
I rewrite it to be able to express the constraint for the circle:
$$
M' \left\{ \begin{array}{l}
x = x' \frac{y - h}{y' - h}\\
z = \varepsilon \frac{y - h}{y' - h}
\end{array} \right.
$$
So, my projected circle should fulfill:
$$
\begin{array}{lll}
M' & & \left\{ \begin{array}{l}
x = x' \frac{y - h}{y' - h}\\
z = \varepsilon \frac{y - h}{y' - h}\\
z \in [\varepsilon, l]\\
x^2 + z^2 = l^2\\
y = h'
\end{array} \right.
\end{array}$$
Posing
$$H = h' - h$$ and $$Y' = y' - h$$:
I get:
$$ \frac{Y'^2}{\left( \frac{\varepsilon^{} H^{}}{l^{}} \right)^2} -
\frac{x'^2}{\varepsilon^2} = 1 $$
This is the equation of an hyperbole of parameters $$a = \frac{\varepsilon
H}{l}$$ and $$b = \varepsilon$$
So for now I'm happy (seems fine).
Then I just rewrite it to plot:
$$
y' = \frac{H}{l} \sqrt{\varepsilon^2 + x'^2} + h
$$
And halas, gnuplot draw:
Obviously wrong.
If the math are fine, I'll post my gnuplot script.
Buf first, did I made an error above?
Thanks for any help!
Thomas.
AS: I had to validate the fact I used the template to post my assignment, however I didn't (but it wouldn't post otherwise - btw it's not an "assignment").
Hello everyone.
I need help with a problem I have and couldn't find the error in made in it.
The goal is to compute the shape of the Earth curvature as saw by a camera.
First, I computed the shape of the horizon itself.
Using the attached figure for notation.
I found a circle of equation:
\begin{equation}
\left\{ \begin{array}{l}
x^2 + z^2 = l^2\\
y = h'
\end{array} \right.
\end{equation}
With
$$h' = \frac{rh}{r + h}$$
and $$ l = r \frac{\sqrt{h (2 r + h)}}{r + h} $$
Then I define an ideal pinhole camera:
The hole is at $$P(0,h,0)$$ (yes, the projection plane is front, but apart of a sign, shouldn't change anything).
I found:
$$
M (x, y, z) \Rightarrow M' \left\{ \begin{array}{l}
x' = \varepsilon x / z\\
y' = \frac{y - h}{z} \varepsilon + h\\
z' = \varepsilon
\end{array} \right. $$
I rewrite it to be able to express the constraint for the circle:
$$
M' \left\{ \begin{array}{l}
x = x' \frac{y - h}{y' - h}\\
z = \varepsilon \frac{y - h}{y' - h}
\end{array} \right.
$$
So, my projected circle should fulfill:
$$
\begin{array}{lll}
M' & & \left\{ \begin{array}{l}
x = x' \frac{y - h}{y' - h}\\
z = \varepsilon \frac{y - h}{y' - h}\\
z \in [\varepsilon, l]\\
x^2 + z^2 = l^2\\
y = h'
\end{array} \right.
\end{array}$$
Posing
$$H = h' - h$$ and $$Y' = y' - h$$:
I get:
$$ \frac{Y'^2}{\left( \frac{\varepsilon^{} H^{}}{l^{}} \right)^2} -
\frac{x'^2}{\varepsilon^2} = 1 $$
This is the equation of an hyperbole of parameters $$a = \frac{\varepsilon
H}{l}$$ and $$b = \varepsilon$$
So for now I'm happy (seems fine).
Then I just rewrite it to plot:
$$
y' = \frac{H}{l} \sqrt{\varepsilon^2 + x'^2} + h
$$
And halas, gnuplot draw:
Obviously wrong.
If the math are fine, I'll post my gnuplot script.
Buf first, did I made an error above?
Thanks for any help!
Thomas.