Finding the nearest point to a curve

Hello, I’m having trouble with something that would seem rather simple, basically I have a sprite and I wish to find the point closest to the sprite from a curved line, I have created an image to show you exactly what I mean. Is there any maths that could do this for me or could I use pixel collision and find the nearest pixel and then find the pixels coordinates that way?

How is the curve described? By a mathematical formula?

Take a look at this site, it helped me.

http://doswa.com/2009/07/13/circle-segment-intersectioncollision.html

The curve would simply be a shape with a curved edge like so, and what I need is to find the closest point from the center of the circle to the closest x,y on the curved line.

If you’re only using circles and not anything more complex, then Pythagoras’ theorem should suffice.

Exactly what I’m talking about can be found here http://www.red3d.com/cwr/steer/Containment.html
And more specifically this section
“When a probe point touches an obstacle, it is projected (indicated by a black line) to the nearest point on the surface of the obstacle”.
What I don’t understand is how the nearest point on the surface of the obstacle is found.