summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Attention.m4
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2023-03-11 21:11:43 +0000
committerKarl Berry <karl@freefriends.org>2023-03-11 21:11:43 +0000
commit6bc45f3087df0ce19bdf3c57a0aec55944ec40ed (patch)
tree3faac3b12b92fc4ba09b62c0472a9b3654dada6a /Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Attention.m4
parent86d58778de06c53c2e0b20f25556b96619a2dc42 (diff)
circuit-macros (11mar23)%
git-svn-id: svn://tug.org/texlive/trunk@66549 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Attention.m4')
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Attention.m441
1 files changed, 41 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Attention.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Attention.m4
new file mode 100644
index 00000000000..7f0b7127c7a
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Attention.m4
@@ -0,0 +1,41 @@
+.PS
+# Attention.m4
+gen_init
+scale = 2.54
+linethick = 0.2
+
+define dot2 { (($1).x*($2).x + ($1).y*($2).y) }
+
+ nlines = 128
+ nr = 50
+ innerrad = 1
+ outerrad = 8
+ diff = outerrad - innerrad
+B: box wid outerrad*2 ht outerrad*2 outline "red" shaded "red"
+C: circle rad outerrad at B
+ circle rad innerrad at C shaded "black"
+ P[0]: C+(innerrad,0)
+ t = 0
+ for i=1 to nr do {
+ r = innerrad+i/nr*diff
+ t = t + i/nr*(-pi_/2)/nr
+ P[i]: C+(rect_(r,t))
+ }
+ dth = twopi_/nlines
+ R: (cos(dth),-sin(dth))
+ S: (sin(dth),cos(dth))
+ for j = 0 to nlines-1 do {
+ for i=0 to nr do {
+ X: P[i]-C
+ Q[nr-i]: (dot2(R,X),dot2(S,X)) + C
+ }
+ shade(j%2,
+ fitcurve(P,nr)
+ line from P[nr] to Q[0]
+ fitcurve(Q,nr)
+ line from Q[nr] to P[0]
+ )
+ for i=0 to nr do { P[i]: Q[nr-i] }
+ }
+
+.PE