The Wayback Machine - https://web.archive.org/web/20201207020542/https://github.com/GcsSloop/AndroidNote/issues/28
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

非零环绕数规则 #28

Open
jiangliang1987 opened this issue Jun 3, 2016 · 10 comments
Open

非零环绕数规则 #28

jiangliang1987 opened this issue Jun 3, 2016 · 10 comments
Labels

Comments

@jiangliang1987
Copy link

@jiangliang1987 jiangliang1987 commented Jun 3, 2016

受益匪浅。 发现一个小笔误,反馈一下: 0在外,非零在内

@GcsSloop
Copy link
Owner

@GcsSloop GcsSloop commented Jun 3, 2016

感谢指正

@GcsSloop GcsSloop closed this Jun 4, 2016
@xingstarx
Copy link

@xingstarx xingstarx commented Oct 13, 2016


根据什么标准来判断 边是从左到右穿过射线的呢,还有边是怎么从右到左穿过射线的?

特别是你的这幅图的p3射线,让人困惑

@jsnow0613
Copy link

@jsnow0613 jsnow0613 commented Oct 13, 2016

我的理解是,左右只是相对这条射线的两边而言的吧,你指定线的一边是左,那另一半就是右了

@CSnowStack
Copy link

@CSnowStack CSnowStack commented Oct 13, 2016

横着切割,平分那个矩形的话,左右要怎么分呢

@jsnow0613
Copy link

@jsnow0613 jsnow0613 commented Oct 13, 2016

如果指定射线上边为左,下边为右,矩形竖着的那两条边方向肯定是相反的,一个向上一个向下,所以肯定是一个从左到右,一个从右到左,环绕数加起来应该是0,所以在外部

@GcsSloop
Copy link
Owner

@GcsSloop GcsSloop commented Oct 13, 2016

将图片旋转一下,让射线竖起来左右就清晰了,例如这样:

@xingstarx
Copy link

@xingstarx xingstarx commented Oct 13, 2016

还是旋转图片,清晰明了,多谢指点啦😄

@CSnowStack
Copy link

@CSnowStack CSnowStack commented Oct 13, 2016

大神,网上说的,顺逆时针的方法,是不是不适用于这个,还是有特殊的限制

@GcsSloop
Copy link
Owner

@GcsSloop GcsSloop commented Oct 13, 2016

不知道你说的顺逆时针是指什么,我知道顺逆时针在 3D 绘图中用来判断正反面。
在 2D 绘图中判断内外区域的一般使用 奇偶规则 或者 非零环绕数规则, 上面讨论的是非零环绕数规则。

@GcsSloop GcsSloop changed the title 若环绕数为0表示在图形内,非零表示在图形外 非零环绕数规则 Oct 13, 2016
@GcsSloop GcsSloop reopened this Oct 13, 2016
@CSnowStack
Copy link

@CSnowStack CSnowStack commented Oct 13, 2016

知道了,百度错东西了,谢谢了

@GcsSloop GcsSloop added the 已解决 label Nov 3, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
5 participants
You can’t perform that action at this time.