I have a curve cutting through my mesh in 2D. It is a moving to the front with time. I have set of points on this curve (front) and my nodes on the mesh. At each time step I need to find which point on the curve (front) is closest to the nodes on my mesh. In other words for each node in my mesh I would like to know which point on the curve is closest to it. Is there a built in MATLAB function to search for this ? (I am using MATLAB environment)
In the figure the question would be which one is the closest black circle to any of the yellow squares.