Created
August 21, 2019 08:26
-
-
Save hmenke/eaddfb41e522c545cef2f3e9ba25a83b to your computer and use it in GitHub Desktop.
My gravatar in ConTeXt with MetaPost
This file contains 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
\startMPpage | |
numeric u; u := 10pt ; | |
picture eighth, quarter; | |
path p, q; | |
drawoptions(withcolor(166/255,165/255,177/255)) ; | |
eighth := image ( | |
fill origin -- (u,0) -- (u,u/2) -- cycle ; | |
fill (0,u) -- (u,u) -- (u,u/2) -- cycle ; | |
fill origin -- (u/2,u/2) -- (0,u) -- cycle ; | |
) ; | |
quarter := image ( | |
p := origin -- (u/2,0) -- (u/2,u/2) -- cycle ; | |
fill p shifted (-0,0) ; | |
fill p shifted (0,u/2) ; | |
fill p shifted (u/2,u/2) ; | |
draw eighth shifted (u,0); | |
draw eighth shifted (0,u); | |
p := (u/2,0) -- (u,u/2) -- (u/2,u) -- (0,u/2) -- cycle ; | |
q := (u/2,u/4) -- (u/4,u/2) -- (u/2,3u/4) -- (3u/4,u/2) -- cycle ; | |
eofill (p -- q -- cycle) shifted (u,u) ; | |
) shifted (-u,-u) ; | |
draw quarter rotated ( 0) shifted (0,0) ; | |
draw quarter rotated ( 90) shifted (2u,0); | |
draw quarter rotated (180) shifted (2u,2u) ; | |
draw quarter rotated (270) shifted (0,2u) ; | |
\stopMPpage |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment