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); p:=0; thick:= 20; thin:= thick*0.5; vardef thick_nib = fix_nib(thick, thin, 0) enddef; path paths[], strokes[]; m:=100; z0 = (0, 0); z1 = (0, 1.1m); paths[p] = z0--z1; pen_stroke( cut(thick_nib, 0)(0) cut(thick_nib, 30)(1) )(paths[p])(strokes[p]); clearxy; p:=p+1; z0=(xpart point 0 of paths[p-1], 0.8m); z1=(x0 + m/2, m); z2=(x1 + m/4,0.85m); z3=(x2, 0.2m); z4=(x1, 0); z5=(x4-m/8, 0.1m); z6=(x5, 0.8m); z7=(x6+m/2, m); z8=(x7+m/4, 0.8m); z9=(x8, 0); paths[p] = z0--z1--z2--z3--z4--z5--z6--z7--z8--z9; pen_stroke( cut(thick_nib, 90)(0) nib(thick_nib)(1,2,3,4,5,6,7,8,9) cut(thick_nib, 0)(9) )(paths[p])(strokes[p]); clearxy; p:=p+1; z0=(xpart point 8 of paths[p-1], 0.8m); z1=(x0 + m/4, m); z2=(x1 + m/6,0.85m); z3=(x2, 0.2m); z4=(x3+m/4,0 ); z5=(x4 + m/6, 0.15m); z6=(x5, 01.1m); paths[p] = z0--z1--z2--z3--z4--z5--z6; pen_stroke( cut(thick_nib, 90)(0) nib(thick_nib)(1,2,3,4,5) cut(thick_nib, 30)(6) )(paths[p])(strokes[p]); for i=0 upto 10: if known strokes[i]: fill strokes[i] withcolor Teal; draw strokes[i] withcolor White; fi; if known paths[i]: draw paths[i] withcolor Gold; for k=0 upto length(paths[i]): draw point k of paths[i] withpen pencircle scaled 2 withcolor Gold; endfor; fi; endfor; endfig; end