Created
February 13, 2026 10:04
-
-
Save santhoshtr/f4094d665db3cf0992820811a8d61a94 to your computer and use it in GitHub Desktop.
The Anatomy of a Smilie #metapost-sandbox
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); | |
| z3 = (x1,y0-radius); | |
| p := z0..z1..z2..z3..cycle; | |
| fill p withcolor 0.5blue; | |
| draw p withcolor white; | |
| clearxy; | |
| z0 = (xpart point 0.5 of p, 0.5radius); | |
| z1 = (xpart point 1.5 of p, y0); | |
| s:=z0{dir +45}..{dir -45}z1; | |
| draw s withcolor white; | |
| second:=s scaled 1 shifted (0,20); | |
| draw second withcolor white; | |
| endfig; | |
| end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment