The title is pretty self explanatory - I trying to implement an algorithm that determines whether a point lies on the edge of an ellipse, given a nontrivial edge thickness.
Reference this question to see the motivation:
The ellipse is defined by the diagonal line through the bounding rectangle, where $(x_1, y_1)$ is the top left corner of the bounding rectangle, and $(x_2, y_2)$ is the bottom right corner of the bounding rectangle.
See this diagram made with my mad MS Paint skills:
I have an existing algorithm at my disposal to determine whether a point is inside an ellipse, so one thought I had was to create two new ellipses, slightly larger and slightly smaller, and determine if the point lies in one but not the other. I think this would work, but I would have to work out where to position the new ellipses to ensure that they are centered on top of each other.
I'm wondering if that is the simplest approach, or if there is some simpler closed form solution.
Note that the thickness extends in either direction from the center of the edge, both to the inside of the ellipse and to the outside equally.
An acceptable solution could be an algorithm that determines the distance to the nearest edge (meaning the centerline of the edge) of the ellipse in terms of the given variables; calculating the rest would be trivial then I think.