擅长:python、mysql、java
<p>确保顶点按要求排列。波纹状顶点的排列方式是绘制三角形而不是矩形。因此,它不会为矩形内的点创建true,而是为三角形内的点创建true。</p>
<pre><code>>>> p = path.Path(np.array([bfp1,bfp2,bfp4,bfp3]))
>>> p
Path([[ 5.53147871 0.78330843]
[ 1.78330843 5.46852129]
[ 0.53147871 -3.21669157]
[-3.21669157 1.46852129]], None)
>>> IsPointInside=np.array([[1,2],[1,9]])
>>> IsPointInside
array([[1, 2],
[1, 9]])
>>> p.contains_points(IsPointInside)
array([False, False], dtype=bool)
>>>
</code></pre>
<p>如果bfp3和bfp4的顺序正确的话,第一点是正确的。</p>