I have a list of points which form a closed (connected) contour or path in two dimensions. I would like to get all points from a second list which satisfy the requirement that they are inside the contour. Of course, I could implement this, but I think that it would be quite tedious. Is there a dedicated Mathematica function or a quick solution which can do it?
The lists are Mathematica tables of tables of two elements representing the Cartesian coordinates of the points. As test examples for the lists you may use.
listcontour={{-1,0},{-1.5,0.5},{0.0,1},{1,0},{-1,0}};
list={{-2,3},{-0.5,0.5},{0.2,0.1}}
I would want the routine to return a list of indices of these points, in this case {2,3}
.
These are just examples, of course.
?Region*
$\endgroup$ParametricRegion
out of it and then useRegionMember
. $\endgroup$