9

I've tried to detail my question using the image shown in this post.

ellipse normals

Consider an ellipse with 5 parameters $(x_C, y_C, a, b, \psi)$ where $(x_C, y_C)$ is the center of the ellipse, $a$ and $b$ are the semi-major and semi-minor radii and $\psi$ is the orientation of the ellipse.

Now consider a point $(x,y)$ on the circumference of the ellipse. The normal at this point on the circumference of the ellipse intersects the major axis at a point $(x_D, y_D)$. This normal makes an angle $/phi$ with the major axis. However, the angle subtended by this point at the center of the ellipse is $\theta$. For a circle, $\theta = \phi$ for all points on its circumference because the normal at the circle is the radial angle subtended by the point on the circumference.

Is there a relationship between the angles $\theta$ and $\phi$ for an ellipse.

For some context, I am trying to "extract" points from the circumference of an ellipse given its parameters $(x_C, y_C, a, b, \psi)$. For such an ellipse, I start from $(x_C, y_C$) and with angle $\theta = 0^\circ$ and I start sweeping until $360^\circ$. Using the equation $\left[\begin{array}{c} x \\ y\end{array}\right] = \left[\begin{array}{c c} \cos(\theta) & -\sin(\theta) \\ \sin(\theta) & \cos(\theta) \end{array}\right] \left[\begin{array}{c} a\cos(\psi) \\ b\sin(\psi) \end{array}\right]$, I get the $(x,y)$ location of the point that is supposed to be on the ellipse circumference. I then look up this location in a list of "edge" points. Along with this list of edge points, I also have gradient angle information for each edge point. This corresponds to the angle $\phi$.

Here is the crux of the question, for a circle, I am confident that the edge point lies on the circumference of the circle if $|\theta - \phi| < \text{threshold}$. But, for an ellipse, how do I get a similar relationship ?

Mustafa
  • 253
  • 1
  • 3
  • 7
  • Does this help you? http://math.stackexchange.com/questions/171936/how-do-i-get-a-tangent-to-a-rotated-ellipse-in-a-given-point/171957#171957 – Asinomás Jul 25 '12 at 19:01
  • what does that equation refer to? The slope of the tangent line? If, so then the slope of the normal is just -1/slope of tangent right ? – Mustafa Jul 25 '12 at 19:12
  • yes, thats right – Asinomás Jul 25 '12 at 19:14
  • Could you point me to how you derived that equation? – Mustafa Jul 25 '12 at 20:30
  • Do you know calculus? – Asinomás Jul 25 '12 at 20:44
  • Yes, I know calculus :) – Mustafa Jul 25 '12 at 21:23
  • The variables $(x_C,y_C)$ and $\psi$ are not needed for this problem and just confuse the issue. Solve it for an ellipse lying on the $x$-axis and later transform the points as needed. – John Alexiou Dec 15 '13 at 16:15
  • http://people.maths.ox.ac.uk/earl/lecture11a.pdf – Mark K Cowan Dec 15 '13 at 16:27
  • Choose a coordinate system $(u,v)$ such that the ellipse is described by the equation $$f(u,v) = \frac{u^2}{a^2} + \frac{v^2}{b^2} = 1$$ It is known that the normal is in the direction $(\frac{\partial f}{\partial u},\frac{\partial f}{\partial v}) = (\frac{2u}{a^2},\frac{2v}{b^2})$. This implies

    $$\tan\phi = \frac{2v}{b^2}\bigg/\frac{2u}{a^2} = \frac{a^2}{b^2}\frac{v}{u} = \frac{a^2}{b^2}\tan\theta$$

    – achille hui Jan 16 '14 at 13:18

3 Answers3

9

With the center at $(0,0)$ and $\psi=0$, the equation of the ellipse is $$\frac{x^2}{a^2}+\frac{y^2}{b^2}=1\text{.}$$ So $$\frac{2x}{a^2}+\frac{2y}{b^2}\frac{dy}{dx}=0$$ and therefore $$\frac{dy}{dx}= -{\frac{xb^2}{ya^2}}\text{.}$$ The slope of the normal line is the negative reciprocal of this, so $$\tan(\phi)=\frac{ya^2}{xb^2}\text{.}$$ Meanwhile, $$\tan(\theta)=\frac{y}{x}\text{.}$$ So, eliminating $\frac{y}{x}$ from these two equations and clearing denominators, the relationship between $\phi$ and $\theta$ is: $$b^2\tan(\phi)=a^2\tan(\theta)$$

2'5 9'2
  • 54,717
  • Curious, I get $b\tan\phi = a\tan\theta$. I think the squares in the formula for $\tan\phi$ go away when replacing $x = a\cos\theta$ and $y=b\sin\theta$, which directly leads to the identity, without the need for $\tan\theta = y/x$ (which is wrong). – Jonathan H Oct 26 '21 at 00:55
  • @JonathanH $\tan\theta=\frac{y}{x}$ is not wrong. And the squares should be there in the final relation. – 2'5 9'2 Oct 26 '21 at 01:29
  • From $\tan\phi=\frac{ya^2}{xb^2}$, you have $\tan\phi=\frac{y}{x}\frac{a^2}{b^2}$, and the answer says to replace $\frac{y}{x}$ with $\tan\theta$. So $\tan\phi=\tan\theta\frac{a^2}{b^2}$. Now clear denominators: $b^2\tan\phi=a^2\tan\theta$. – 2'5 9'2 Oct 26 '21 at 01:35
  • @JonathanH In your suggested edit, you say to substitute $x=a\cos\theta$. That would only be correct if the radius from the origin to $(x,y)$ were $a$, but it is somewhere in between $a$ and $b$. Likewise for $y=b\sin\theta$. – 2'5 9'2 Oct 26 '21 at 01:39
  • The radius from the origin to $(x,y)$ (for $\Psi = 0$) is $\sqrt{ a^2\cos^2\theta + b^2\sin^2\theta }$, which is always somewhere between $b$ and $a$. – Jonathan H Oct 26 '21 at 01:41
  • 1
    @JonathanH I think I see your confusion. The ellipse can be parametrized by $(a\cos(t), b\sin(t))$. At position $t$, the angle is not $t$. It is the angle $\theta$ illustrated in the picture, with $\tan\theta=\frac{b}{a}\tan(t)$. – 2'5 9'2 Oct 26 '21 at 01:42
  • I am saying that your substitutions $x=a\cos(\theta)$, $y=b\sin(\theta)$ are not correct. – 2'5 9'2 Oct 26 '21 at 01:43
  • You are right, I confused $t$ and $\theta$. The formula for the normal / tangeant using $t$ instead of $\theta$ are much simpler IMO, but that's not what the OP wants. The relationship between the two is $\tan\theta = \frac{b}{a}\tan t$, which gives the same identity that you posted (with the squares). Apologies! – Jonathan H Oct 26 '21 at 01:58
  • 1
    No problem. Now that my mind was on this for a bit, from the dark recesses of my memory I recall one time making the same mixup, and I remember it kind of blowing my mind that the two things are not the same. They are the same for circles, of course, so it is natural to think that extends to ellipses. I'm happy to delete all my comments here to clear the thread if you like. – 2'5 9'2 Oct 26 '21 at 02:01
  • As you prefer, I think my comments might be misleading to future readers, but then again if someone else makes the same mistake, it might be helpful to them. Perhaps adding a bit about this at the end of your post would serve the same purpose, and we could then delete our comments? – Jonathan H Oct 26 '21 at 04:16
2

First solve the problem for a horizontal ellipse at the origin, and then transform the result to the desired coordinates.

If any curve is given in polar coordinates as $r(\theta)$ then the angle between the normal and the position vector is

$$\tan \psi= - \frac{r'(\theta)}{r(\theta)} $$

Why? Look at the picture below. Imagine a curve (green) defined in polar coordinates. The tangent unit vector is decomposed into ${\rm d}r$ and $r {\rm d}\theta$ components.

Cam

The angle $\psi$ from the radius to the normal is $$\tan\psi =- \frac{{\rm d}r}{r {\rm d}\theta}$$

The negative sign is to indicate that it moves in the opposite direction from $\theta$.

From this you can work out the rest you need.

Horizontal Ellipse:

$$r(\theta) = \frac{a b}{\sqrt{a^2-(a^2-b^2)\cos^2\theta}} $$

$$\tan \psi =\frac{(a^2-b^2)\sin\theta\cos\theta}{a^2 - (a^2-b^2)\cos^2\theta} $$

John Alexiou
  • 13,816
0

Take $P = (p_x, p_y)$ on the circumference to be functions of angle, $\theta$.

Now use the Cartesian equation of an ellipse:

$\frac{x^2}{a} +\frac{y^2}{b} = 1$

Differentiate w.r.t. $\theta$:

$2 \frac{dx}{d\theta} \frac{x}{a} + 2 \frac{dy}{d\theta} \frac{y}{b} = 0$

Cancel the 2:

$\frac{dx}{d\theta} \frac{x}{a} + \frac{dy}{d\theta}\frac{y}{b}= 0$

As we want the gradient at a particular point or angle, we know the value of $(x, y) = (p_x, p_y)$, so:

$\frac{dx}{d\theta}\frac{p_x}{a} + \frac{dy}{d\theta}\frac{p_y}{b} = 0$

Divide through by $\frac{dx}{d\theta}$ if you want $\frac{dy}{dx}$:

$\frac{p_x}{a} + \frac{dy}{dx} \frac{p_y}{b} = 0$

To get the line equation of the tangent, use the direction from this line equation plus a point on the line (e.g. where the tangent meets the ellipse):

$L = (p_x, p_y) + \mu (-b\ p_y, a\ p_x)$