Find the intersection point of a polyline with a circle / sphere

Here is a sandcastle in case anyone has the same question:
:european_castle: