頂点列で表すPolygonを構成する長いエッジに対しエッジ分割し、頂点を追加する。

頂点列で表すPolygon図形を構成するエッジのうち、任意の長さ以上のエッジに対して分割し頂点を増やす処理。

Process of dividing vertices of arbitrary length and increasing vertex among edges constituting Polygon figure represented by vertex sequence.

(results sample picture)
@red points : Polygon points
@blue pattern : Filled polygon
before
before split edge
after
after split edge

(results split edge)
original_points
[[237.894 0. ]
[130.554 105.408]
[ 43.748 0.626]
[ 0. 42.589]
[129.559 189. ]
[280. 42.589]
[237.894 0. ]]

after split points
[[237.894 0. ]
[184.224 52.704 ]
[130.554 105.408 ]
[ 87.151 53.017 ]
[ 43.748 0.626 ]
[ 0. 42.589 ]
[ 64.7795 115.7945 ]
[129.559 189. ]
[179.706 140.19633333]
[229.853 91.39266667]
[280. 42.589 ]
[237.894 0. ]]

sample code

■polygon_points.txt
237.894 0.000
130.554 105.408
43.748 0.626
0.000 42.589
129.559 189.000
280.000 42.589
237.894 0.000

コメントを残す

メールアドレスが公開されることはありません。 * が付いている欄は必須項目です