Debian Codegraph @

texmf-dist/doc/latex/circuit-macros/examples/dpv/EyeDPV.m4

raw
1 .PS
2 # EyeDPV.m4
3 gen_init
4
5 define(`eye',`[ u = $1; v = 0.47*u; w = 0.25*u
6 shade(1,
7 arc thick 0 from (u/2,0) to (-u/2,0) with .c at (0,-u/3)
8 arc thick 0 to (u/2,0) with .c at (0,u/3) )
9 circle diam v fill_(0.24) at (0,0)
10 circle diam w fill_(0) at (0,0)
11 circle thick 0 diam last circle.diam/2 fill_(1) at last circle.nw
12 circle diam last circle.diam-lthick at last circle outlined graystring(0.9)
13 ] ')
14
15 skale = 2/3
16 Bx: box wid 11*skale ht 8.5*skale fill_(0) at (0,0)
17 C[0]: Bx.se; C[1]: Bx.nw
18 d[5] = 0.92*Bx.ht
19 d[4] = 0.78*Bx.ht
20 d[3] = 0.62*Bx.ht
21 d[2] = 0.40*Bx.ht
22 d[1] = 0.25*Bx.ht
23 ane = atan2(Bx.ht,Bx.wid)*rtod_
24 dax = 360/64
25 da = 1
26 for a=-int(ane/dax)*dax to 180-ane by dax do {
27 T1: intersect_(Bx.ne,C[(a>ane)],Bx,(Rect_(1,a+da)))
28 T2: intersect_(Bx.ne,C[(a>ane)],Bx,(Rect_(1,a)))
29 line outlined "white" shaded "white" from Bx to T1 then to T2 then to Bx
30 line outlined "white" shaded "white" from Bx to T1*(-1) \
31 then to T2*(-1) then to Bx
32 }
33 for i=5 to 2 by -1 do {
34 C[i]: circle diam d[i] fill_(0) at Bx
35 for a=0 to 359 by dax do {
36 T1: Rect_(d[i]/2,a)
37 T2: Rect_(d[i]/2,a-da*2)
38 nx = int(distance(T1,T2)/lthick*1.5+0.5)
39 for h = 1 to nx-1 do {
40 spline 0.55 outlined "white" from h/nx between T1 and T2 \
41 to 0.8 between Bx and T2 then to (Rect_(d[i]/4,a+31)) }
42 }
43 }
44 C[1]: circle thick 2 diam d[1] at Bx fill_(0.1)
45 eye(d[1]-4bp__) at (0,0)
46 for a=0 to 359 by dax do {
47 T1: (Rect_(d[1]/2-1bp__,a))
48 T2: (Rect_(d[1]/2-1bp__,a+dax/2))
49 line thick 0.4 from T1 to T2 then to 0.5 between Bx and T2 \
50 then to 0.5 between Bx and T1 then to T1 shaded "white"
51 }
52
53 .PE