Drawing polygons from vertex coordinates
4 views (last 30 days)
Show older comments
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 Comments
Answers (1)
Steven Lord
on 1 Apr 2024
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 Comments
See Also
Categories
Find more on Elementary Polygons in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!