Iterative mesh vertex Move

Hello Guys so I’m making this simple c# code that moves mesh vertex in an iterative way using a timer that I made internally in script but I can’t seem to get the desired result.

Can anyone help me figure out how to do it ?
Youssef. (24.1 KB)

What is the desired result?

The mesh point moves inside only once , I want it to move inside once every 500ms for an example

@DanielPiker Here the code made in grasshopper. I’m trying to get the same results buy in C# since I’m gonna be using it for a plugin.

With each iteration the the closest point on the mesh moves to a direction opposite to the repulser point to the closest point vector as the in the pictures with a few consecutive iterations

I hope I answered your question about the desired result .

Thank you.

. (15.5 KB)

I solved the error myself. It figures the recursion was just a loop assigned to a timer that has a count that I use as an end for my loop. (22.1 KB)