Hi everyone!

I’m working on a graph in which I need to find the shortest distance from a point to another unspecified point on a curve. I thought that the LoopWhile node could come in handy, but I can’t wrap my head around how it works.

In order to find the shortest distance I want to create a circle by center point and radius at my known point. Then I want to test for intersections between the circle and the curve. I want to loop this and vary the circle radius until the intersection count with the curve equals 1. The point where the circle intersects the curve only once is then the output that I’m interested in. Is this at all possible to do in Dynamo? Any answers are very much appreciated.

I’ve attached a (very) simplified image of my problem: