Guide a wire along the touch with deformation.

I have a very specific problem to solve. I am working an project where user will guide a wire along an artery. So dragging along the path was not an issue, problem is that wire should follow the path as the user touch is going, ie , wire should deform along the path (snake like movement).

I have tried PathMagic , it is amazing but somehow not specific to my requirement.

Any idea what should I do, use or from where to start?

My simple solution would probably be to create the mesh at runtime, add short segments as necessary to extend the “wire”.

My initial prototype would add a new segment for every movement, but my final version would attempt to optimize it so that it creates a new segment after a certain distance or turning degree.