|
|
I think you just need to get yourself a good closest-point-on-line function.
This way, even if you are checking your cicrle against several line segments, some of which may form peaks as you say, you should be able to just take the closest result that you get from your checks. You could then take the distance between the closest point and the origin of your circle, and compare it to the radius of your circle, to see if you are touching/embedded in one of the line segments.
|