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!