| 1 |
.PS |
| 2 |
# Eye.m4 |
| 3 |
# https://getpocket.com/explore/item/pillars-of-fire-truly-adventurous?utm_source=pocket-newtab |
| 4 |
gen_init |
| 5 |
|
| 6 |
define(`eye',`[ u = `$1'; v = 0.47*u; w = 0.25*u |
| 7 |
# for pdf, linethick in shade must be environment |
| 8 |
lth = linethick; linethick = 0 |
| 9 |
shade(1, |
| 10 |
arc outlined "red" from (u/2,0) to (-u/2,0) with .c at (0,-u/3) |
| 11 |
arc to (u/2,0) with .c at (0,u/3) ) |
| 12 |
linethick = lth |
| 13 |
circle diam v fill_(0.25) at (0,0) |
| 14 |
circle diam w fill_(0) at (0,0) |
| 15 |
circle thick 0 diam last circle.diam/2 fill_(1) at last circle.nw |
| 16 |
circle diam last circle.diam-lthick at last circle outlined graystring(0.9) |
| 17 |
] ') |
| 18 |
|
| 19 |
skale = 2/3 |
| 20 |
Bx: box wid 11*skale ht 8.5*skale fill_(0) at (0,0) |
| 21 |
ane = atan2(Bx.ht,Bx.wid)*rtod_ |
| 22 |
d[5] = 0.92*Bx.ht |
| 23 |
d[4] = 0.78*Bx.ht |
| 24 |
d[3] = 0.62*Bx.ht |
| 25 |
d[2] = 0.40*Bx.ht |
| 26 |
d[1] = 0.25*Bx.ht |
| 27 |
da = 1 |
| 28 |
dax = 360/64 |
| 29 |
C[0]: Bx.se; C[1]: Bx.nw |
| 30 |
for a=-int(ane/dax)*dax to 180-ane by dax do { |
| 31 |
T1: (Rect_(1,a+da)); T1: intersect_(Bx.ne,C[(a>ane)],Bx,T1) |
| 32 |
T2: (Rect_(1,a)); T2: intersect_(Bx.ne,C[(a>ane)],Bx,T2) |
| 33 |
line outlined "white" shaded "white" from Bx to T1 then to T2 then to Bx |
| 34 |
line outlined "white" shaded "white" from Bx to T1*(-1) \ |
| 35 |
then to T2*(-1) then to Bx |
| 36 |
} |
| 37 |
for i=5 to 2 by -1 do { |
| 38 |
C[i]: circle diam d[i] fill_(0) at Bx |
| 39 |
for a=0 to 359 by dax do { |
| 40 |
T1: (Rect_(d[i]/2,a)) |
| 41 |
T2: (Rect_(d[i]/2,a-da*2)) |
| 42 |
lth = linethick; linethick = 0 |
| 43 |
shade(1, |
| 44 |
arc cw from T1 to T2 with .c at Bx |
| 45 |
spline 0.55 thick 0 to 0.8 between Bx and T2 \ |
| 46 |
then to (Rect_(d[i]/4,a+30)) |
| 47 |
arc cw to (Rect_(d[i]/4,a+32)) with .c at Bx |
| 48 |
spline 0.55 thick 0 to 0.8 between Bx and T1 then to T1 ) |
| 49 |
linethick = lth |
| 50 |
} |
| 51 |
} |
| 52 |
C[1]: circle thick 2 diam d[1] at Bx fill_(0.1) |
| 53 |
eye(d[1]-4bp__) at (0,0) |
| 54 |
for a=0 to 359 by dax do { |
| 55 |
T1: (Rect_(d[1]/2-1bp__,a)) |
| 56 |
T2: (Rect_(d[1]/2-1bp__,a+dax/2)) |
| 57 |
line thick 0 from T1 to T2 then to 0.5 between Bx and T2 \ |
| 58 |
then to 0.5 between Bx and T1 then to T1 shaded "white" #outlined "white" |
| 59 |
} |
| 60 |
|
| 61 |
.PE |