How can you calculate how close a fixed point is to an ellipse without using derivatives? Using derivatives, this distance can be calculated by plotting the gradient that is perpendicular to the gradient of a line that touches the ellipse and the fixed point, plotting the derivative of the ellipse function and finding where the two intersect. However, because the function for the derrivative include a square root, solving for this intersection is an enormous function.
If the example was determining how close a trajectory, determined by two fixed points, is to and ellipse there is a work around involving scaling the ellipse and coordinates into a circle.
- Determine which radii of the ellipse is smaller.
- Scale that axis of the graph by the eccentricity of the ellipse (ellipse position, ellipse radius, fixed point positions) such that the ellipse becomes a circle.
- Calculate the gradient between the two scaled points.
- Calculate the perpendicular gradient to the step 3 gradient.
- Plot a line with the step 4 gradient that intersects the center of the circle.
- Calculate the the coordinate for the intersection between the step 5 line and the circle, this is point three.
- Scale the graph by the inverse of the step 2 factor (including the step 6 point).
- Calculate the gradient between the two unscaled, original points.
- Plot a line with the step 8 gradient that intersects one of the unscaled, original points.
- Calculate the perpendicular gradient to the step 8 gradient.
- Plot a line with the step 10 gradient that intersects point three.
- Calculate the the coordinate for the intersection between the step 9 line and the step 11 line, this is point four.
- Calculate the distance between point three and point four.
This works because a line drawn from the closest point on an ellipse to a fixed point will always be perpendicular to the tangent of the ellipse at that location. Two points provides a gradient, making determining the perpendicular gradient easy. Combining that with the relationship between ellipses and circles makes it very quick, as circles are very easy to work with.
With only a single point, I cannot think of any way to determine what the gradient ought to be. I cannot determine any relationship when scaling the ellipse into a circle either. Does anybody know of any exploitable relationship here that would prevent the need for the derivative calculations?