Metapost Sandbox
Debug
save
Save
play_arrow
Run
download
Export
share
Share
Link to share
Embed
person
Login using Github
My work
New...
Log out
Documentation
About
input mpcolornames; beginfig(0); path paths[]; h=500; u=h/10; p:=0; clearxy; z0 = (x1-u, 0.9h); z1 = (0, 0.75h); z2 = (0, 0.15h); z3 = (x0, 0); z4=(x0+4u, y3); z5=(x4-u, y2); z6=(x5, h); paths[p] = z0{dir -30}..z1--z2{down}..{dir 200}z3--z4{dir 160}..{up}z5--z6--cycle; clearxy; p:=p+1; z0 = (xpart point infinity of paths[p-1] + 2u, 0.75h); z1 = ((x0+x2)/2, h); z2 = (x0 +0.75h, 0.75h); z3 = (x2, 0.15h); z4 = (x2+2u, 0.1h); z5 = ((x4+x6)/2, 0); z6 = (x2-2.1u, 0.15h); z7 = (x6, 0.7h); paths[p] = z0{dir 45}..z1..z2{dir -90}..{dir -80}z3..{dir 45}z4{dir 225} ..z5..{dir 95}z6..{dir 90}z7..{dir 225}cycle; for i=0 upto 20: if known paths[i]: fill paths[i] withcolor RoyalBlue; fi; endfor; endfig; end