I was wondering if you could help me figure this out.
I've been trying to write some code to calculate the farthest point on an ellipse $(150w, 85h)$ from a given point $(55x, 20y)$ within the ellipse. Could anyone help walk me through the steps to achieve this? I've looked through a few examples and it still isn't clicking yet. Is there a way to find the farthest point on the ellipse from a point within the ellipse without using brute force (comparing each point on the ellipse to the point within the ellipse)?
Assume we only know the ellipse size/location, and the point's location.
Also, the numbers I am using are made up so feel free to change them to illustrate your point.
- Ellipse: size $(150w, 85h)$, center $(0x, 0y)$ (is known)
- Point within ellipse: $(55x, 20y)$ (is known)
Edited for clarification. I appreciate the responses so far, but I'm looking for a formula where I don't have to compare the point within the ellipse to each point on the ellipse's edge (ideally).