A new way of determining quartic for closest point on known ellipse to known point in space?

90 Views Asked by At

I've noticed a geometric relationship between a fixed point and the closest point on the ellipse. The equations are simplistic, I'm hoping that it is useful because of it's inherent simplicity and that potentially it would be computationally inexpensive. My two questions are:

  1. Is there already an established method that is less computationally expensive or more simplistic?
  2. If 1 is false, is this a new method?
  3. If 1 is false and 2 is true, can it be proven? (I don't know how to do a mathematical proof)

Below is a diagram of a cartesian plane showing a point in space and an ellipse, illustrating some terms of my example:

Below is the same example reframed into triangles, illustrating the remaining terms of my example:

p (pₓ, pᵧ) is a known point in space.

rₓ is the known horizontal major axis of the ellipse.

rᵧ is the known vertical minor axis of the ellipse.

I will be defining a variable for ease of use, s. Scaling the y value of the ellipse by factor s creates a circle: $$s=\frac{rₓ}{rᵧ}$$ $$Pᵧ=spᵧ$$

The relationship I discovered is this: $$A→s^2\frac{y₀}{x₀}=\frac{y₁}{x₁}$$

Using the diagrams, the following equations can be deduced: $$B→x₀+x₁=pₓ$$ $$C→y₀+y₁=Pᵧ$$ $$D→x₀^2+y₀^2=rₓ^2$$

Rearranging B, C and D we can get: $$B→x₁=pₓ-x₀$$ $$C→y₁=Pᵧ-y₀$$ $$D→y₀=\sqrt{x₀^2-rₓ^2}$$

First substitute B and C into A. Then substitute D into A. The resulting equation is: $$A→s^2\frac{\sqrt{x₀^2-rₓ^2}}{x₀}=\frac{Pᵧ-\sqrt{x₀^2-rₓ^2}}{pₓ-x₀}$$

Simplyfy the equation until it reaches this state: $$pₓs^2\sqrt{rₓ^2+x₀^2}+(1-s^2)x₀\sqrt{rₓ^2+x₀^2}=Pᵧx₀$$

Square both sides, subtract the right hand term from both sides and simplify. You will arrive a quartic (4th degree polynomial): $$(2s^2-s^4-1)x^4+(2pₓs^4-2pₓs^2)x^3+(rₓ^2s^4-2rₓ^2s^2+rₓ^2-Pᵧ^2-pₓ^2s^4)x^2+(2rₓ^2 pₓs^2-2rₓ^2pₓs^4)x+(pₓ^2s^4rₓ^2)=0$$

Or to use variable substitution to make it easier to read: $$a=2s^2-s^4-1$$ $$b=2pₓs^4-2pₓs^2$$ $$c=rₓ^2s^4-2rₓ^2s^2+rₓ^2-Pᵧ^2-pₓ^2s^4$$ $$d=2rₓ^2 pₓs^2-2rₓ^2pₓs^4$$ $$e=pₓ^2s^4rₓ^2$$ $$ax^4+bx^3+cx^2+dx+e=0$$

One of the x intercepts of this quartic is the same as the x component of the point on the ellipse that is closest to the point in space.

Worked example:

Let the following be the known variables: $$rₓ=30$$ $$rᵧ=10$$ $$pₓ=50$$ $$pᵧ=25$$

That allows us the calculate the following variables: $$s=\frac{30}{10}=3$$ $$Pᵧ=3×25=75$$

That's all the variables we need to fill out our quartic: $$a=2×3^2-3^4-1=-64$$ $$b=2×50×3^4-2×50×3^2=7,200$$ $$c=30^2×3^4-2×30^2×3^2+30^2-75^2-50^2×3^4=-150,525$$ $$d=2×30^2×50×3^2-2×30^2×50×3^4=−6,480,000$$ $$e=50^2×3^4×30^2=182,250,000$$ $$-64x^4+7,200x^3+-150,525x^2+6,480,000x+182,250,000=0$$

Edit: This quartic appears to hold true for internal points as well.