在复杂多边形中查找点
This polygon could be shaped like a C
I tried the formula located here
How can I determine whether a 2D Point is within a Polygon?
however it doesn't actually correctly predict if the point is in the polygon.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
最简单的方法 - 特别是对于很多点来说,是对多边形进行三角测量,然后进行三角形测试中的一个点。
您可以将多边形转换为一组凸多边形,但这比较棘手。
另请参阅4 边多边形内的随机点
Easiest way - especially for lots of points is to triangulate the polygon then do a point in triangle test.
You could convert the polygon into a set of convex polygons but that is trickier.
See also Random points inside a 4-sided Polygon