how to draw a irregular shape ?

3 Ansichten (letzte 30 Tage)
BHARATH KUMAR MANOHARAN
BHARATH KUMAR MANOHARAN am 2 Feb. 2016
Beantwortet: Image Analyst am 2 Feb. 2016
help me drawing a ir regular shape

Antworten (2)

Star Strider
Star Strider am 2 Feb. 2016
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.

Image Analyst
Image Analyst am 2 Feb. 2016
Try imfreehand(). See attached demos.

Kategorien

Mehr zu Computational Geometry finden Sie in Help Center und File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by