Queued line following lines of delaunay mesh

Hello,

I have been trying to build a patch where a moving line travels along the lines from a delaunay triangulated mesh, moving from from vertice to vertice, taking random paths but always sticking to the lines of the mesh. I was trying a b-spline and managed to construct something close. The problem is when the moving line jumps between vertices not connected with a line. I think this is an indexing problem and I had been working with ‘nearest neighbor’ but think I could use some help.

Many Thanks
O

forgot to add the patch…

line vertice follow.v4p (39.9 kB)