summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/circuit-macros/examples/dpv/ex00DPV.m4
blob: 97c52687257f1434da75ecbd7fd757d06c4b3962 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
.PS
# ex00.m4
gen_init(svg_font(sans-serif,11bp__))

[
thicklines_
ewid = 2
eht = 0.5
E: ellipse wid ewid ht eht

   [  narrows = 5
      de = ewid/narrows
      for i=0 to narrows do {
         arrow down from i*de,0 }
      ] with .s at E.n+(0,0.25)

   "svg_bf(B)svg_it((t))" at last [].c

thinlines_
   arrow from E.c to E.ne
   box invis fill_(1) ht 0.12 wid 0.12 with .c at last arrow.c "svg_it(r)"

 command "</g>" # end font
]
[
# ex07.m4
#gen_init

Barrel: box invis ht 0.4 wid 1.5
  up
Face: arc rad 2.6 from Barrel.e+(2.4,-1.7/2) to Barrel.e+(2.4,1.7/2)

  eps = 0.03
  arc ccw rad 2.6 from Face.start-(eps,0) to Face.end-(eps,0) \
    with .c at Face.c-(eps,0)
  line from Barrel.nw to Barrel.ne then to Face.end
  line from Barrel.sw to Barrel.se then to Face.start
  arc cw from Barrel.sw to Barrel.nw rad Barrel.ht*1.2

Cathode: Barrel.w+(0.3,0)
Term: Barrel.w+(-0.25,0)
  dcath = 0.13
  dan = 0.12

  line from Cathode up   dcath/2 left dcath/2 then to Term.x,Cathode.y+dcath/2
  dot
  line from Cathode down dcath/2 left dcath/2 then to Term.x,Cathode.y-dcath/2
  dot

  hole = 0.06
Hole: line invis up hole from Cathode+(0.5,-hole/2)
  line from Hole.end     up dan-hole/2 then to Term.x,Cathode.y+dan; dot
  line from Hole.start down dan-hole/2 then to Term.x,Cathode.y-dan; dot

  platewid = 0.25
  platesep = 0.15
Plates: box invis wid platewid ht platesep at Barrel.e+(-platewid/2,0)
  line right platewid from Plates.nw
  line right platewid from Plates.sw
  line up 0.3 from Plates.n
  line down 0.3 from Plates.s

linethick_(1.4)

  move to Cathode+(0.03,0)
Spot: 0.9<Face.start,Face.end>
  arcto(Plates.c,Spot,(Plates.c.x-Cathode.x)*0.90,outlined "lightgrey" thick 2)
  line to Spot chop 0 chop -0.02 outlined "lightgrey" thick 2

thinlines_

  arrow <- from Cathode+(0.2,0.06) up 0.5 left 0.3
   "electron" above "gun" above

  arrow <- from Plates.nw+(0,0.06) up 0.5 left 0.3
   "deflection" above "plates" above

  arrow <- from 0.5<Plates.e,Spot>+(0,0.06) up 0.5 left 0.3
   "electron beam" at Here+(-0.3,0) above

  spline <- from 1.015<Plates.e,Spot> right 0.1 up 0.1 then up 0.1 \
   then up 0.1 left 0.1
   "spot of light" rjust

  "vacuum" at 0.5<Face.start,Face.end>+(-0.4,0) rjust

  arrow <- from Face.start+(0.1,0.5) left 0.6*1.4 down 0.3*1.4
   "phosphor coating" rjust

  arrow <- from 0.2<Barrel.se,Face.start> left 0.6 down 0.3
   "glass enclosure (tube)" rjust

] with .sw at last [].se+(0.5,0)
.PE