Redian新闻
>
Re: [转载] 有什么算法可以确定一个点在不在多边形内?
avatar
Re: [转载] 有什么算法可以确定一个点在不在多边形内?# Computation - 科学计算
c*t
1
【 以下文字转载自 EE 讨论区 】
【 原文由 cmmiut 所发表 】
draw a half-line towards right.
Count the total number of intersections bwteen the half-line and the polygon.
If the number is even, outside. If odd, inside.
Problem may arise if there are degenerate cases (2D is easy to handle,
3D will be much harder). A technique called SOS (simulation of simplicity)
gives an easy solution.
相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。