Skip to content

Instantly share code, notes, and snippets.

@santhoshtr
Created February 13, 2026 10:04
Show Gist options
  • Select an option

  • Save santhoshtr/6108e81bad3d07cdad0239f329e28fbe to your computer and use it in GitHub Desktop.

Select an option

Save santhoshtr/6108e81bad3d07cdad0239f329e28fbe to your computer and use it in GitHub Desktop.
Calligraphic pen - Razor nib with small thickness #metapost-sandbox
beginfig(0);
nib_width:=100;
nib_thick:=10;
rotation:=40;
pen mypen;
path p;
z0 = (-nib_width/2,0);
z1 = (x0, nib_thick);
z2 = (x1+nib_width, y1);
z3 = (x0+nib_width, y0);
p = z0--z1--z2--z3--cycle;
fill p withcolor green;
mypen = makepen p rotated rotation;
clearxy;
z0 = (x1+150, 0);
z1 = (0, y0+250);
z2 = (x1+250, y1+250);
z3 = (x2+250, y1);
z4 = (x2, y0);
pickup mypen;
draw z0..z1..z2..z3..z4 withcolor white;
endfig;
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment