Cover shapes in background with filled shapes in foreground

1 次查看(过去 30 天)
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.

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Elementary Polygons 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by