👷♂️
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| % based on https://tug.ctan.org/info/drawing-with-metapost/Drawing-with-Metapost.pdf | |
| vardef hsv_color(expr h, s, v) = | |
| save chroma, hh, x, m; | |
| chroma = v * s; | |
| hh = h / 60; | |
| x = chroma * (1 - abs(hh mod 2 - 1)); | |
| m = v - chroma; | |
| if hh < 1: (chroma,x,0)+(m,m,m) | |
| elseif hh < 2: (x,chroma,0)+(m,m,m) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| beginfig(0); | |
| width:=100; | |
| rotation:=45; | |
| pen calligraphicpen ; | |
| calligraphicpen := makepen ((0, 0)--(width,0 ) rotated rotation) ; | |
| z0 = (x1+150, 0); | |
| z1 = (0, y0+250); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| input plain_ex; | |
| input mpcolornames; | |
| beginfig(0); | |
| p:=0; | |
| thick:= 100; | |
| thin:= thick*0.5; | |
| rotation:=-30; | |
| vardef elliptical_nib = fix_nib(thick, thin, rotation) enddef; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| beginfig(0); | |
| nib_width:=100; | |
| nib_thick:=5; | |
| rotation:=45; | |
| pen calligraphypen; | |
| path p; | |
| z0 = (-nib_width/2,0); | |
| z1 = (x0, nib_thick); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| beginfig(0); | |
| nib_width:=100; | |
| nib_thick:=10; | |
| rotation:=40; | |
| pen mypen; | |
| path p; | |
| z0 = (-nib_width/2,0); | |
| z1 = (x0, nib_thick); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| beginfig(0); | |
| width:=500; | |
| height:=500; | |
| z0 = (x1 + 0.25width, 0); | |
| z1 = (0, y0+height/2); | |
| z2 = (x1 + width/2, y1+height/2); | |
| z3 = (x2 + width/2, y1); | |
| z4 = (x3 - 0.25width, y0); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| input mpcolornames; | |
| beginfig(0); | |
| radius := 350; | |
| pickup pencircle scaled 10; | |
| path p; | |
| path s,l; | |
| z0 = (0, radius); | |
| z1 = ((x0+x2)/2, y0+radius); | |
| z2 = (x1+radius, y0); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| input mpcolornames; | |
| beginfig(0); | |
| radius := 350; | |
| pickup pencircle scaled 10; | |
| path p; | |
| path s,l; | |
| z0 = (0, radius); | |
| z1 = ((x0+x2)/2, y0+radius); | |
| z2 = (x1+radius, y0); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| beginfig(0); | |
| radius := 50; | |
| pickup pencircle scaled 2; | |
| path p; | |
| path s, second; | |
| z0 = (0, radius); | |
| z1=((x0+x2)/2,y0+radius); | |
| z2 = (x1+radius,y0); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| beginfig(0); | |
| radius := 50; | |
| pickup pencircle scaled 2; | |
| path p; | |
| path s, second; | |
| z0 = (0, radius); | |
| z1=((x0+x2)/2,y0+radius); | |
| z2 = (x1+radius,y0); |