H****h 发帖数: 1037 | 1 你可以算出每条边相对于你的参考点所张的角,取值在(-\pi,\pi),
符号依赖于边的方向。然后把所有角求和。
如果得到2\pi或-2\pi,那么参考点就在多边形里。
如果是0,就在外面。不会有别的值了。
, | s***t 发帖数: 195 | 2 how to define a polygon from many points? is it the convex hull of the
points? or something else.
and a polygon can be defined by inequalies. check if the inequalities are
satisfied. |
|