how to draw a irregular shape ?
3 ビュー (過去 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 で Computational Geometry についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!