Cover shapes in background with filled shapes in foreground

1 Ansicht (letzte 30 Tage)
Saeid
Saeid am 2 Apr. 2020
Bearbeitet: Saeid am 2 Apr. 2020
I would like to draw shapes using the polyshape function, e.g. by writing:
x0=[0 0 200 200]; y0=[10 0 0 10]
SquareShape=polyshape(x0,y0)
plot(SquareShape)
hold on
ElmX=[0 5 10 20 25 30 40 40 60 70 85 95]
ElmY=[12 -2 12 -2 12 -2 12 -2 12 -2 12 -2]
plot(ElmX,ElmY)
hold on
x1=[10 10 20 20]; y1=[10 0 0 10]
SquareShape=polyshape(x1,y1)
plot(SquareShape)
but when I run the routine it generates transparent pictures, whereas I want the last shape created last (in this case the one created in the line before last) to cover the surface beneath itself.

Antworten (0)

Kategorien

Mehr zu Elementary Polygons 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