Debian Codegraph @

texmf-dist/doc/latex/circuit-macros/examples/extras/Optics.m4

raw
1 .PS
2 # Optics.m4
3 # https://tex.stackexchange.com/questions/623201/geometrical-optics
4 gen_init
5 scale = 2.54
6
7 textoffset = 4pt__
8 O: dot(at (0,0)) ; "\Large $O$" below rjust
9 L: line thick 1 right_ 14 with .c at O
10 S: dot(at (1.8,0)) ; "\Large $S$" below rjust
11 r = 7
12 C: dot(at (S.x-r,0)) ; "\Large $C$" below
13 F: dot(at (-1.8,0)) ; "\Large $F$" below
14 I: dot(at (4,0)) ; "\Large $I$" below
15 arrow dashed from I up_ 3.2 ; It: Here
16 AS: C.x+sqrt(r^2-3.7^2),3.7
17 Arc: arc thick 1 cw from AS to (AS.x,-AS.y) rad r with .c at C
18 for y=-AS.y to AS.y+0.001 by 0.1 do { line thick 0.4 right 0.5 up 0.1 \
19 from (C.x+sqrt(r^2-y^2),y) }
20 M: move from C to It
21 A1: arrow outlined "red" from C to LCintersect(M,C,r,R) chop -2 chop 0
22 arrow outlined "red" dashed to It chop 0 chop -3
23 N: move from It to F
24 arrow <- outlined "red" dashed from It to LCintersect(N,C,r) chop -2 chop 0
25 P: move down_ 1 from A1.start
26 arrow outlined "red" from last arrow.end to Intersect_(P,N)
27 Q: move up 1 from O
28 arrow from O to Intersect_(Q,M)
29 arrow outlined "red" to (C.x+sqrt(r^2-Here.y^2),Here.y)
30
31 .PE