I have a set of points pts1
and a point redPts
as below:-
pts1 = BlockRandom[SeedRandom[7]; RandomReal[1, {30, 2}]];
plot1 = DelaunayMesh[pts1]
redPts = {0.68, 0.75}
plot2a = ListPlot[pts1, AspectRatio -> 1];
plot2b = ListPlot[{redPts}, PlotStyle -> Red];
Show[plot2a, plot2b]
As you can see, redPts
must lie inside a face of the Delaunay Mesh. I want to have the coordinates of the 3 vertexes of that face. What can I do?
One of my solutions is to check the distance of "all points v.s. red point" and then pick the 3 points with the smallest distance. But is that possible to make use of the DelaunayMesh
?
Many thanks!