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 plain_ex; input mpcolornames; beginfig(0); path paths[], strokes[]; thick:= 50; thin:= 0.75; vardef pennib = fix_nib(thick, thick*thin, 0) enddef; vardef terminalnib= fix_nib(thick*xthick, 0, 0) enddef; vardef thinterminalnib= fix_nib(thick*thin, 0, 0) enddef; w:=1; m:=500; mw:=m*w; z0= (x1 + mw/3, 0); z1= (0, y0 + mw/2); z2 = (x1 + mw/2, y1 + m/2); % top z3 = (x2 + mw/2, y1); z4 = (x3 - mw/3, 0.1m); % bottom middle z5 = (x4 - mw/3, y3); z6 = (x5 + mw/2, y2); % second top z7 = (x6 + mw/2, y1); z8 = (x7 - mw/3, y0); % paths[0] = (z0 ..z1 ..z2{right}.. z3..{left}z4) slanted tand(-8); paths[0] := paths[0] && (z4{left}.. z5 ..z6{right}..z7..z8) slanted tand(8); pen_stroke( cut(pennib, rel 90)(0, infinity) nib(pennib)(1, 2, 3,4,5,6,7) )(paths[0])(strokes[0]); for i=0 upto 10: if known strokes[i]: fill strokes[i] withcolor Teal; fi; if known paths[i]: draw paths[i] withcolor Gold; fi; endfor; endfig; end