Equation of normal vector pointing away from ellipse

1k Views Asked by At

Assuming that I have an ellipse, centered at $(h,k)$ of type:

$$\left(\frac {x-h}{a}\right)^2 + \left(\frac {y-k}{b}\right)^2 = 1$$

The gradient of the normal is:

$$\frac{a^2(y-k)}{b^2(x-h)}$$

From this I can get a vector representation of the normal, but my question is, is there a way to get the normal vector such that it is always pointing away from the center?

1

There are 1 best solutions below

1
On

I think the simplest way is look at the coordinate $(x,y)$ on the ellipse.

For example, if $x-k > 0$, then choose your $x$-component to be positive. Same for $y$-component

explicitly, $(\frac{x-h}{a^2},{\frac{y-k}{b^2}})$

For gradient, do you mean $$\nabla\left(\left(\frac{x-h}{a}\right)^2+\left(\frac{y-k}{b}\right)^2\right)=2(\frac{x-h}{a^2},{\frac{y-k}{b^2}}) ?$$

Usually for any function $f(x,y)$, the normal direction of the contour $f(x,y)=c$ is easily obtained by taking gradient of $f(x,y)$ as you did. If you want to obtain the normal pointing outward, just choose the right sign in front of $f(x,y)$ such that the value of the function increases as you go outward. Then take the gradient and the normal will be automatically pointing outward.

(I would like to make it a comment but I don't have enough reputation. XP )