Drawing polygons from vertex coordinates
4 ビュー (過去 30 日間)
古いコメントを表示
I have a plane of 100 x 100 mm dimension, which include mutliple polygons inside of it. I have 128 vertex coordinates from which i need to draw 26 polygons. KIndly suggest how to draw polygon using the data
0 件のコメント
回答 (1 件)
Steven Lord
2024 年 4 月 1 日
If you're hoping MATLAB will automatically "figure out" what the polygons should be from your scattered coordinates, I don't think there's a function to do that. If you had this set of points:
x = [0, 1, 1, 0, 0.5]
y = [0, 0, 1, 1, 0.5]
plot(x, y, 'o')
axis([-1 2 -1 2])
axis square
What should be "the" polygon or polygons created from those points? Should it be the square around the four outermost points? Should it be that square with one of the triangles consisting of two adjacent vertices and the center point "cut out" (and if so, which of the four triangles do you want to cut out)?
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Elementary Polygons についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!