How to calculate the distance from a point on ellipse arc to the chord

158 Views Asked by At

Now I have an ellipse-arc starting at $A$ and ending at $B$, so $AB$ is the chord of the ellipse-arc. I want to know how to calculate the maximum distance from the points on the ellipise-arc to the chord.

3

There are 3 best solutions below

0
On

Not a full answer, but too long to be a comment:

Let $A,B\in\mathbb{R}^2$ be (given) points which lie in the ellipse, and the ellipse to be represented by all points $x\in\mathbb{R}^2$ which comply $x^TMx=1$ for some positive definite matrix $M$. Moreover, the chord from $A$ to $B$ is parametrized by all points $y$ which comply $y=\lambda A + (1-\lambda)B$ with $\lambda\in[0,1]$. Thus, if I understood correctly, you want to solve the optimization program: $$ \begin{aligned} D=\max_{x,\lambda}\ &\|x-(\lambda A + (1-\lambda)B)\|\\ s.t.\ \ & x^TMx=1\\ & 0\leq \lambda\leq 1 \end{aligned} $$ Or equivalently $$ \begin{aligned} D=\max_{x,\lambda}\ &(x-(\lambda A + (1-\lambda)B))^T(x-(\lambda A + (1-\lambda)B))\\ s.t.\ \ & x^TMx=1\\ & 0\leq \lambda\leq 1 \end{aligned} $$ Note that if you ignore the constraint $0\leq \lambda\leq 1$ thus, the solution would be $D=\infty$ since points in the line $\lambda A + (1-\lambda)B$ can go all the way to infinity. So we can't ignore $0\leq \lambda\leq 1$. I'm saying this since if you were interested in the minimum distance instead of the maximum, you could ignore $0\leq \lambda\leq 1$, and thus use Lagrange multipliers to solve the previous problem and maybe find an explicit formula.

Now, in your case, at this point I see no other way but to solve this problem numerically. Due to the geometry of the problem, I think one may be able to show that there is a unique maximizer (but I don't have this clear right now). So using a numerical solver such as $\texttt{fmincon}$ from MATLAB should be able to do the work.

Now, note that my approach could be an overkill. Another contributor, more skilled in geometry than me, may find a clever argument to solve this problem more easily.

0
On

Presumably you know something about the ellipse, perhaps $\dfrac{x^2}{a^2}+\dfrac{y^2}{b^2}=1$

and presumably you know something about $A$ and $B$, perhaps that they are where $y=mx+c$ intersects the ellipse

Then you can say that the tangents to the ellipse parallel to $AB$ can be expressed as $y = mx \pm \sqrt{a^2m^2+b^2}$

and the maximum distance from the the ellipise-arc to the chord is $\dfrac{|c\mp \sqrt{a^2m^2+b^2}|}{\sqrt{1+m^2}}$

with the $\pm$ and $\mp$ determined by which of the two arcs resulting from the chord you are referring to.

2
On

Let $O$ be the centre of the ellipse, $M$ the midpoint of $AB$ and $P$ the intersection between line $OM$ and arc $AB$. The tangent through $P$ is parallel to $AB$, hence you just need to compute the distance from $P$ to line $AB$.