diff options
Diffstat (limited to 'Master/texmf-dist/doc/latex/circuit-macros/examples/ex15.m4')
-rw-r--r-- | Master/texmf-dist/doc/latex/circuit-macros/examples/ex15.m4 | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/ex15.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/ex15.m4 new file mode 100644 index 00000000000..3b7092a51a9 --- /dev/null +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/ex15.m4 @@ -0,0 +1,40 @@ +.PS +# ex15.m4 +gen_init + +[ +n = 10; r = 1 +for i = 1 to n-1 do { + for j = i+1 to n do { + line from rect_(r,i*twopi_/n) to rect_(r,j*twopi_/n) + } + } + ] +[ + linethick = 2.5 + crad = 1.0 + C: circle rad crad + g = 0.65 + D: C+(Rect_(crad*g,110)) + rm = crad+distance(C,D) + for r=lthick to rm by 2*lthick do { + if r < (1-g)*crad then { circle rad r at D thick r/rm*linethick } \ + else { arc cw from Cintersect(D,r,C,crad) \ + to Cintersect(D,r,C,crad,R) with .c at D thick r/rm*linethick } + } + + linethick = 1.5 + C: circle invis rad crad with .w at C.e+(0.1,0) + D: C+(Rect_(crad*g,110)) + a = 1 # fade rate parameter + for r=lthick to rm by lthick do { + u = 1-(r/rm*(a*r/rm+(1-a))) + if r < (1-g)*crad then { circle outlined rgbstring(u,u,u) rad r at D } \ + else { arc cw outlined rgbstring(u,u,u) from Cintersect(D,r,C,crad) \ + thick linethick*1.5 to Cintersect(D,r,C,crad,R) with .c at D + } + } + circle rad C.rad at C + ] with .w at last [].e+(0.1,0) + +.PE |