Debian Codegraph @

texmf-dist/doc/latex/optikz/optikz_doc_code/example_butterfly.tex

raw
1 \begin{tikzpicture}[scale=0.9]
2 % \draw[step=1cm, gray, very thin] (-5,-5) grid (5,5);
3 \draw[thick] (160:5)coordinate(M1) --
4 (-20:5)coordinate(M2) -- (20:5)coordinate(M3) -- (195:6)coordinate(M4) -- (165:6)coordinate(M5) -- (-14:6)coordinate(M6) -- (14:6)coordinate(M7) -- (190:7)coordinate(M8) -- (170:7)coordinate(M9) -- (-8.9:7)coordinate(M10) -- (8.9:7)coordinate(M11) -- (186:8)coordinate(M12);
5
6 \draw[thick, {-latex}] (M1) -- +(0,-4)node[right]{Output};
7 \draw[thick, {latex-}] (M12) -- +(0,3)node[right]{Input};
8
9 \mirror[angle=125] at (M1);
10 \mirror[angle=125-180] at (M2);
11 \mirror[angle=55] at (M3);
12 \mirror[angle=55+180] at (M4);
13 \mirror[angle=125] at (M5);
14 \mirror[angle=125-180] at (M6);
15 \mirror[angle=55] at (M7);
16 \mirror[angle=55+180] at (M8);
17 \mirror[angle=125] at (M9);
18 \mirror[angle=125-180] at (M10);
19 \mirror[angle=55] at (M11);
20 \mirror[angle=55+180] at (M12);
21
22 \filldraw[fill=red!60!black, fill opacity=0.7, draw=black, thick] (-.52,-.1) rectangle ++(.25,.4);
23 \node at (-0.4,-0.8){laser medium};
24 \end{tikzpicture}