how to draw a irregular shape ?
22 次查看(过去 30 天)
显示 更早的评论
help me drawing a ir regular shape
0 个评论
回答(2 个)
Star Strider
2016-2-2
Here is one way:
N= 12; % Number Of Sides To Polygon
a = sort(rand(N,1))*2*pi;
r = randi(9, N, 1);
x = cos(a).*r;
y = sin(a).*r;
figure(1)
plot([x; x(1)], [y; y(1)])
This creates a randomly-shaped polygon. Change it to produce the sort of shape you want.
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!