如何确定多边形边的哪一侧位于多边形内部,哪一边位于外部? [英] How to determine which side of a polygon edge is inside a polygon, and which is outside?

查看:127
本文介绍了如何确定多边形边的哪一侧位于多边形内部,哪一边位于外部?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个多边形的边(凸或凹)。我想知道是否从边缘开始直到结束点,我必须向右或向左转动才能进入多边形的内部或外部。我怎么检查它?

I have an edge of a polygon (convex or concave). I want to find out if, going straight from start to end point of that edge, I have to turn right or left to get inside or outside of polygon. How can I check that?

推荐答案

在这个方向上遍历整个多边形。如果你发现你顺时针走了,那么内部就在右边;如果你逆时针走了,它就在左边。

Traverse the whole polygon in that direction. If you find that you went clockwise, then the interior is to the right; if you went counter-clockwise, it's to the left.

这篇关于如何确定多边形边的哪一侧位于多边形内部,哪一边位于外部?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆