diff options
author | rodri <rgl@antares-labs.eu> | 2020-02-22 09:56:09 +0000 |
---|---|---|
committer | rodri <rgl@antares-labs.eu> | 2020-02-22 09:56:09 +0000 |
commit | a39951d8f69209cfea2b7051832b851914e662ef (patch) | |
tree | e4cd1c32e5d6f531b523f6fda558cc3a5f603547 /smiley.pic | |
download | brokentoys-a39951d8f69209cfea2b7051832b851914e662ef.tar.gz brokentoys-a39951d8f69209cfea2b7051832b851914e662ef.tar.bz2 brokentoys-a39951d8f69209cfea2b7051832b851914e662ef.zip |
now version controlled.
Diffstat (limited to 'smiley.pic')
-rw-r--r-- | smiley.pic | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/smiley.pic b/smiley.pic new file mode 100644 index 0000000..611228d --- /dev/null +++ b/smiley.pic @@ -0,0 +1,26 @@ +.PS +define smiley { + # takes three arguments: x, y and size (radius) + + r0 = $3 # Face + r1 = 0.4*r0 # Radius of mouth and eye locations + r2 = 0.04*r0 # Radius of eyes + +C: circle rad r0 at ( $1, $2 ) + + circle rad r2 filled at last circle + ( r1, r1 ) # Right eye + circle rad r2 filled at 2nd last circle + ( -r1, r1 ) # Left eye + + pi = atan2( 0, -1 ) +S: C + ( r1 * cos(1.25*pi), r1 * sin(1.25*pi) ) + line from S to S + for phi=1.25*pi to 1.75*pi by 0.1 do { + line to C + ( r1 * cos(phi), r1 * sin(phi) ) # Mouth + } +} + +pi2 = 2 * atan2( 0, -1 ) +for x=0.1 to 1.3 by 0.08 do { + smiley( 1.5 * x * cos(x*pi2), 1.1 * x * sin(x*pi2), 0.23 * x ) +} +.PE |