Skip to content

Instantly share code, notes, and snippets.

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

  • Save santhoshtr/6956d4beb2802149f868b46142cee18f to your computer and use it in GitHub Desktop.

Select an option

Save santhoshtr/6956d4beb2802149f868b46142cee18f to your computer and use it in GitHub Desktop.
Diwali #metapost-sandbox
beginfig(0);
width:=100;
rotation:=-40;
pen calligraphypen;
calligraphypen := makepen((0,0)--(width,0) rotated rotation);
z0 = (300, 500);
z1 = (x0, y0-150);
z2 = (x0, y1-150);
pickup calligraphypen;
draw z0{dir -45}..{dir 225}z1..{dir -45}z2 withcolor red;
clearxy;
z0 = (175, 200);
z1 = (x0+300, y0);
z2 = ((x0+x1)/2, y0-150);
fill z0--z1{down}..{left}z2..cycle withcolor red;
endfig;
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment