フィルターのクリア

Replace polygon vertices outside boundary by vertices on boundary

3 ビュー (過去 30 日間)
Marc Laub
Marc Laub 2020 年 5 月 22 日
コメント済み: Marc Laub 2020 年 5 月 22 日
Hallo,
following probelm:
I have a cell arra where the coordinates of many polygons are in, generted by a voronoi tesselation. Since my seeda are finite, the polygons at the outer limits of my rnd seeds re elongated into infinite space. Which would be the best method, to replace the verticies outside a specified limit or to generate a vertice that does not exist yet, by vertices on that limiting boundarys?
As you can see in the pictute below, i want to replace the red vertices outside the black box and those which aret there because there is no intersection(right top corner), by the blue vertices, which are the intersection points of the outer boundary and polgon lines whoch have one point outide the box.
What would be the best method to do so?
  2 件のコメント
darova
darova 2020 年 5 月 22 日
I'd use polyxpoly to detect intersection points
Marc Laub
Marc Laub 2020 年 5 月 22 日
intersect works much better.
Unfortunately the vertices of the intersection are with some small error. The x-coords of the intersection points with a horizontal line are of by like 10^-17 from the const horizontal value...I have to loop over it again and correct those value with a tolerance to the know const value of the hoizontal or vertical lines

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeElementary Polygons についてさらに検索

製品


リリース

R2019b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by