Debian Codegraph @

texmf-dist/doc/latex/tikz-mirror-lens/tikz-mirror-lens.tex

raw
1 % !TeX spellcheck = en_US
2 % !TeX encoding = UTF-8
3 % =============================
4
5 \documentclass[a4paper,10pt]{article}
6 \input{input_pacotes}
7
8 % ========== Dados capa folha rosto ========== Sempre crie uma cópia local
9 \newcommand{\textoVersao}{Version}
10 \newcommand{\Titulo}{\textbf{Spherical mirrors and lenses in {\TikZ} -- English}}
11 \newcommand{\Pais}{\textbf{Brazil} -- \textbf{{\today} -- \textoVersao: \versao}}
12 % ==========
13
14 \begin{document}
15
16 % ========== Capas
17 \FHZCapaArticleCabecalho{\AutorA}{\Titulo}{{\Cidade} {\Estado} {\Pais}}
18 % ==========
19
20 \begin{abstract}
21 \begin{FHZmirroLensTcolorbox}
22 This is the documentation for the \texttt{tikz-mirror-lens} package. This package allows the automatic drawing of the image of objects in spherical mirrors and lenses from the data of the focus, from the position and height of the object, calculating the position and height of the image, and presenting the notable rays.
23 \end{FHZmirroLensTcolorbox}
24 \end{abstract}
25
26 \begin{FHZmirroLensTcolorbox}
27 {\small \tableofcontents}
28 \end{FHZmirroLensTcolorbox}
29
30 \section{Quick start, settings and commands}
31
32 The variables used are:
33 \begin{itemize}
34 \item \texttt{f}: mirror or lens focus;
35 \item \texttt{p}: position of the object along the $x$ axis;
36 \item \texttt{pp}: position of the image along the $x$ axis;
37 \item \texttt{o}: height of the object;
38 \item \texttt{i}: image height;
39 \item \texttt{epsilon}: absolute distance between $p$ and $f$;
40 \item \texttt{yM}: mirror height;
41 \item \texttt{xL}: axis extension $x$ to the left;
42 \item \texttt{xR}: axis extension $x$ to the right;
43 \item \texttt{(xC,yC)}: Coordinates of the location of the presented data;
44 \item \texttt{arrows}: optional argument to change the density of arrows.
45 \end{itemize}
46
47 The main commands that create the mirror or lens diagrams based on the object's focus $f$, position $p$ and height $o$, in addition to other adjustment parameters, are:
48 \begin{itemize}
49 \item Mirrors
50 \begin{itemize}
51 \item \verb|\mirrorSphGauss[arrows]{f}{p}{o}{epsilon}|;
52 \item \verb|\mirrorSphGaussCoord[arrows]{f}{p}{o}{epsilon}|;
53 \item \verb|\mirrorSphGaussFixed[arrows]{f}{p}{o}{epsilon}{yM}{xL}{xR}|;
54 \item \verb|\mirrorSphGaussFixedCoord[arrows]{f}{p}{o}{epsilon}{yM}{xL}{xR}{(x_C,y_C)}|;
55 \end{itemize}
56 \item Lenses
57 \begin{itemize}
58 \item \verb|\lensSphGauss[arrows]{f}{p}{o}{epsilon}|;
59 \item \verb|\lensSphGaussCoord[arrows]{f}{p}{o}{epsilon}|;
60 \item \verb|\lensSphGaussFixed[arrows]{f}{p}{o}{epsilon}{yM}{xL}{xR}|;
61 \item \verb|\lensSphGaussFixedCoord[arrows]{f}{p}{o}{epsilon}{yM}{xL}{xR}{(x_C,y_C)}|;
62 \end{itemize}
63 \item Lenses with object on the left
64 \begin{itemize}
65 \item For each lens in the previous block, change \enquote{\texttt{Gauss}} to \enquote{\texttt{GaussL}}.
66 \end{itemize}
67 \end{itemize}
68
69 \section{Gaussian spherical mirror model}
70
71 \subsection{Modeling}
72
73 The equations for the position $p^{\prime}$ and the height $i$ of the image from the focus $f$ of the mirror and the position $p$ and height $o$ of the object are:
74 \begin{equation}
75 \begin{split}
76 \dfrac{1}{f} & = \dfrac{1}{p} + \dfrac{1}{p^{\prime}} \Rightarrow p^{\prime} = \dfrac{f p}{p - f}, \quad p \neq f, \\
77 i & = - \dfrac{p^{\prime}}{p} o.
78 \end{split}
79 \end{equation}
80
81 Mirror type definitions are made based on the focus' signal:
82 \begin{equation}
83 \begin{split}
84 f > 0: & \; \textrm{concave}, \\
85 f < 0: & \; \textrm{convex}.
86 \end{split}
87 \end{equation}
88
89 \autoref{fig:def_coordenadas_espelho} presents the definition of the mirror coordinate system, in which $p > 0$ is the position of the object along the $x$ axis and $p^{\prime} < 0$ is the image position along the $x$ axis. The vertex $V$ of the mirror is the origin of the coordinate system.
90
91 \begin{figure}[!ht]
92 \centering
93 \captionbox{Sign convention for spherical mirrors\label{fig:def_coordenadas_espelho}}[\linewidth]{
94 \begin{tikzpicture}[
95 extended line/.style={shorten >=-#1,shorten <=-#1},
96 extended line/.default=1cm]
97 \mirrorBase{2}{2}{-2}{4.5}
98 \mirrorPts{0}{2}{4}
99 \mirrorLensObjIma{1}{-2}{1}{2}
100 \draw[red] (0,0) node[above left] {(0,0)};
101 \draw[-latex] (0,-1) -- ++(1,0) node[midway, above]{$p > 0$};
102 \draw[thin] (1,-1.2) -- ++(0,1);
103 \draw[-latex] (0,-1) -- ++(-2,0) node[midway, above]{$p^{\prime} < 0$};
104 \draw[thin] (-2,-1.2) -- ++(0,1);
105 \begin{scope}[purple]
106 \draw (4.5,0) node[above] {$x+$};
107 \draw (0,2) node[right] {$y+$};
108 \draw (-2.5,0) node[above] {$x-$};
109 \draw (0,-2) node[right] {$y-$};
110 \end{scope}
111 \end{tikzpicture}
112 }
113 \end{figure}
114
115 \subsection{Ready-made mirror setups}
116
117 \autoref{tab:tab_configuracoes_espelhos} presents all ready-made mirror configurations provided by the package. The notation is:
118 \begin{itemize}
119 \item \texttt{arrow}: distance between drawn arrows, in case of omission, the default is 60 (pt).
120 \item \texttt{epsilon}: distance between object and focus at which the image is not calculated or drawn because it is too big and/or too far from the vertex;
121 \item \texttt{yM}: mirror height, either data or calculation;
122 \item \texttt{xL}: negative limit of the $x$ axis;
123 \item \texttt{xR}: positive limit of the $x$ axis;
124 \item \texttt{Co}: the ordered pair $(x_C,y_C)$ of the block of equations that show the focus and coordinates of the object and the image.
125 \end{itemize}
126
127 \begin{table}[!ht]
128 \centering
129 \captionbox{All mirror settings ready\label{tab:tab_configuracoes_espelhos}}[\linewidth]{
130 \input{input_tab_configuracoes_espelhos}
131 }
132 \end{table}
133
134 \subsection{Constituent commands}
135
136 The command that calculates the position $p^{\prime}$ and the height $i$ of the image is:
137 \begin{itemize}
138 \item \verb|\mirrorMath{f}{p}{o}{epsilon}{yM}|.
139 \end{itemize}
140
141 The following commands draw the main components of the diagram,
142 \begin{itemize}
143 \item mirror drawing: \verb|\mirrorBase{f}{yM}{xL}{xR}|;
144 \item notable points drawing: \verb|\mirrorPts{v}{f}{c}}|;
145 \item notable rays drawing: \verb|\mirrorRays[arrows]{p}{pp}{o}{i}|.
146 \end{itemize}
147
148 The following commands are the same for mirrors and lenses, and are responsible for,
149 \begin{itemize}
150 \item object and image drawing item: \verb|\mirrorLensObjIma{p}{pp}{o}{i}|;
151 \item description of numerical coordinate values: \verb|\mirrorLensCoord{p}{pp}{o}{i}{f}{Co}|.
152 \end{itemize}
153
154 \subsection{Examples of each possible mirror case}
155
156 \subsubsection{Concave}
157
158 Figures from \ref{fig:conc01} to \ref{fig:conc05} present the 5 possible cases of positioning an object in front of a concave mirror.
159
160 % \autoref{fig:conc02} ... \autoref{fig:conc03} ... \autoref{fig:conc04} ... \autoref{fig:conc05} ...
161
162 \begin{figure}[!ht]
163 \centering
164 {\scriptsize \verb|\mirrorSphGaussFixedCoord{2}{4.5}{2.5}{0.4}{3}{1.5}{4}{(4,-1)}|}
165 \captionbox{Case 1, object far from the mirror, beyond the center of curvature\label{fig:conc01}}[\linewidth]{
166 \adjustbox{height=4cm}{\mirrorSphGaussFixedCoord{2}{4.5}{2}{0.4}{3}{1.5}{4}{(4.8,1)}
167 }
168 }
169 \end{figure}
170
171 \begin{figure}[!ht]
172 \centering
173 {\scriptsize \verb|\mirrorSphGaussFixedCoord{2}{4}{2}{0.4}{3}{1.5}{4}{(4.5,1)}|}
174 \captionbox{Case 2, object located on the center of curvature\label{fig:conc02}}[\linewidth]{
175 \adjustbox{height=4cm}{\mirrorSphGaussFixedCoord{2}{4}{2}{0.4}{3}{1.5}{4}{(4.5,1)}}
176 }
177 \end{figure}
178
179 \begin{figure}[!ht]
180 \centering
181 {\scriptsize \verb|\mirrorSphGaussFixedCoord{2}{3.6}{2}{0.4}{3}{1.5}{4}{(4,1)}|}
182 \captionbox{Case 3, object located between the center of curvature and the focus of the mirror\label{fig:conc03}}[\linewidth]{
183 \adjustbox{height=4cm}{\mirrorSphGaussFixedCoord{2}{3.6}{2}{0.4}{3}{1.5}{4}{(4,1)}}
184 }
185 \end{figure}
186
187 \begin{figure}[!ht]
188 \centering
189 {\scriptsize \verb|\mirrorSphGaussFixedCoord{2}{2}{2}{0.4}{3}{1.5}{4}{(2.5,1)}|}
190 \captionbox{Case 4, object located on the focus of the mirror (or less than a distance $\varepsilon \to 0$)\label{fig:conc04}}[\linewidth]{
191 \adjustbox{height=4cm}{\mirrorSphGaussFixedCoord{2}{2}{2}{0.4}{3}{1.5}{4}{(2.5,1)}}
192 }
193 \end{figure}
194
195 \begin{figure}[!ht]
196 \centering
197 {\scriptsize \verb|\mirrorSphGaussFixedCoord{2}{0.45}{1.5}{0.4}{2.5}{1}{4}{(2,-1)}|}
198 \captionbox{Case 5, object located between focus and mirror vertex\label{fig:conc05}}[\linewidth]{
199 \adjustbox{height=4cm}{\mirrorSphGaussFixedCoord{2}{0.45}{1.5}{0.4}{2.5}{1}{4}{(2,-1)}}
200 }
201 \end{figure}
202
203 \subsubsection{Convex}
204
205 \autoref{fig:covx} presents two different positions of the single case of positioning an object in front of a convex mirror.
206
207 \begin{figure}[!ht]
208 \centering
209 \begin{minipage}[c]{0.45\linewidth}
210 \centering{\tiny \verb|\mirrorSphGaussFixedCoord{-2}{1.5}{1.5}{0.4}{2}{-3}{2}{(2,-1)}|}
211 \end{minipage} %
212 \begin{minipage}[c]{0.45\linewidth}
213 \centering{\tiny \verb|\mirrorSphGaussFixedCoord{-2}{4}{1.5}{0.4}{2}{-3}{4.2}{(2,-1)}|}
214 \end{minipage}
215 \captionbox{Single case, object located in front of the mirror, at any distance from it\label{fig:covx}}[\linewidth]{
216 \subcaptionbox{Object close to vertex}{
217 \adjustbox{width=0.45\linewidth}{\mirrorSphGaussFixedCoord{-2}{1.5}{1.5}{0.4}{2.5}{-3}{2}{(2,-1)}}
218 }\hfill
219 \subcaptionbox{Object far from vertex}{
220 \adjustbox{width=0.45\linewidth}{\mirrorSphGaussFixedCoord{-2}{4}{1.5}{0.4}{2.5}{-3}{4.2}{(2,-1)}}
221 }
222 }
223 \end{figure}
224
225 % Exercício: Prova que toda a imagem no espelho convexo está entre o vértice $V$ e o foco $f$. Ou seja, é impossível que $p^{\prime}$ seja menor que $f$ e maior que $V$.
226
227 % Exercício: Prova que toda a imagem no espelho convexo é menor que a altura do objeto.
228
229 \subsection{Animation}
230
231 The basic syntax to insert an animated object is
232 \begin{FHZmirroLensTcolorbox}
233 \begin{verbatim}
234 %\usepackage{animate}
235 \begin{animateinline}[poster=first, controls, palindrome, bb=-5 -5 50 50]{10}
236 \multiframe{100}{rx=0.5+0.05}{
237 \mirrorSphGaussFixed[50]{2}{6-\rx}{2}{0.4}{11}{-8.5}{12}
238 }
239 \end{animateinline}
240 \end{verbatim}
241 \end{FHZmirroLensTcolorbox}
242
243 For more details, please, check the \href{https://ctan.org/pkg/animate}{animate} package.
244
245 \subsubsection{Concave}
246
247 \autoref{fig:anim_mirror_conc} presents an animation containing the movement of an object close to a concave mirror.
248
249 \begin{figure}[ht]
250 \centering
251 \captionbox{Animation of object approaching a concave mirror\label{fig:anim_mirror_conc}}[\linewidth]{
252 \adjustbox{height=6cm}{
253 \begin{animateinline}[poster=first, controls, palindrome, bb=-5 -5 50 50]{10}
254 \multiframe{100}{rx=0.5+0.05}{
255 \mirrorSphGaussFixed[50]{2}{6-\rx}{2}{0.4}{11}{-8.5}{12}
256 }
257 \end{animateinline}
258 }
259 }
260 \end{figure}
261
262 \subsubsection{Convex}
263
264 \autoref{fig:anim_mirror_covx} presents an animation containing the movement of an object close to a convex mirror.
265
266 \begin{figure}[ht]
267 \centering
268 \captionbox{Animation of object approaching a convex mirror\label{fig:anim_mirror_covx}}[\linewidth]{
269 \adjustbox{height=6cm}{
270 \begin{animateinline}[poster=first, controls, palindrome, bb=-5 -5 50 50]{10}
271 \multiframe{100}{rx=0.5+0.05}{
272 \mirrorSphGaussFixed[50]{-2}{6-\rx}{2}{0.4}{2.5}{-4.5}{6}
273 }
274 \end{animateinline}
275 }
276 }
277 \end{figure}
278
279 \section{Gaussian spherical lens model}
280
281 \subsection{Modeling}
282
283 \autoref{fig:def_coordenadas_lente} presents the definition of the lens coordinate system in two cases, the one with the object on the positive side in \autoref{subfig:def_coordenadas_lente-a} and with the object on the negative side \autoref{subfig:def_coordenadas_lente-b}.
284
285 \begin{figure}[!ht]
286 \centering
287 \captionbox{Sign convention for spherical lenses\label{fig:def_coordenadas_lente}}[\linewidth]{
288 \subcaptionbox[0.4\linewidth]{Object in right reference\label{subfig:def_coordenadas_lente-a}}{
289 \adjustbox{width=0.45\linewidth}{
290 \begin{tikzpicture}[
291 extended line/.style={shorten >=-#1,shorten <=-#1},
292 extended line/.default=1cm]
293 \lensBase{2}{2}{-4.5}{6}
294 \lensPts{0}{2}{4}
295 \mirrorLensObjIma{6}{-3}{1.5}{-0.75}
296 \draw[red] (0,0) node[above left] {(0,0)};
297 \draw[-latex] (0,-1) -- ++(6,0) node[midway, above]{$p > 0$};
298 \draw[thin] (6,-1.2) -- ++(0,1);
299 \draw[-latex] (0,-1.5) -- ++(-3,0) node[midway, above]{$p^{\prime} < 0$};
300 \draw[thin] (-3,-1.5) -- ++(0,0.7);
301 \begin{scope}[purple]
302 \draw (6,0) node[below right] {$x+$};
303 \draw (0,1.5) node[right] {$y+$};
304 \draw (-4,0) node[above left] {$x-$};
305 \draw (0,-1.5) node[right] {$y-$};
306 \end{scope}
307 \end{tikzpicture}
308 }
309 }\hfill
310 \subcaptionbox[0.4\linewidth]{Object in left reference\label{subfig:def_coordenadas_lente-b}}{
311 \adjustbox{width=0.45\linewidth}{
312 \begin{tikzpicture}[
313 extended line/.style={shorten >=-#1,shorten <=-#1},
314 extended line/.default=1cm]
315 \lensBase{2}{2}{-6}{4.5}
316 \lensPts{0}{-2}{-4}
317 \mirrorLensObjIma{-6}{3}{1.5}{-0.75}
318 \draw[red] (0,0) node[above left] {(0,0)};
319 \draw[-latex] (0,-1.4) -- ++(3,0) node[midway, above]{$p^{\prime} > 0$};
320 \draw[thin] (3,-1.6) -- ++(0,0.8);
321 \draw[-latex] (0,-1) -- ++(-6,0) node[midway, above]{$p < 0$};
322 \draw[thin] (-6,-1.2) -- ++(0,1);
323 \begin{scope}[purple]
324 \draw (4.5,0) node[above] {$x+$};
325 \draw (0,1.5) node[right] {$y+$};
326 \draw (-6.5,0) node[above] {$x-$};
327 \draw (0,-1.5) node[left] {$y-$};
328 \end{scope}
329 \end{tikzpicture}
330 }
331 }
332 }
333 \end{figure}
334
335 Lens type definitions are made based on the focus signal:
336 \begin{equation}
337 \begin{split}
338 f > 0: & \quad \textrm{convergent}, \\
339 f < 0: & \quad \textrm{divergent}.
340 \end{split}
341 \end{equation}
342
343 \subsubsection{Object on the right}
344
345 For the object on the right, the easiest way to correct the model from a spherical mirror to a spherical lens is to change the sign of $p^{\prime}$.
346
347 The equations for the position $p^{\prime}$ and the height $i$ of the image from the focus $f$ of the mirror, and the position $p$ and height $o$ of the object are:
348 \begin{equation}
349 \begin{split}
350 \dfrac{1}{f} & = \dfrac{1}{p} - \dfrac{1}{p^{\prime}} \Rightarrow p^{\prime} = \dfrac{f p}{f - p}, \quad p \neq f, \\
351 i & = \dfrac{p^{\prime}}{p} o.
352 \end{split}
353 \end{equation}
354
355 \subsubsection{Object on the left}
356
357 For the object on the left, the expression for $p^{\prime}$ and $i$ are given by:
358 \begin{equation}
359 \begin{split}
360 \dfrac{1}{p^{\prime}} & = \dfrac{1}{p} + \dfrac{1}{f} \Rightarrow p^{\prime} = \dfrac{f p}{f + p}, \quad p \neq -f, \\
361 i & = \dfrac{p^{\prime}}{p} o.
362 \end{split}
363 \end{equation}
364
365 \subsection{Ready lens settings}
366
367 The \autoref{tab:tab_configuracoes_lentes} presents all the ready-made lens configurations provided by the package.
368
369 \begin{table}[ht]
370 \centering
371 \captionbox{All lens settings ready\label{tab:tab_configuracoes_lentes}}[\linewidth]{
372 \input{input_tab_configuracoes_lentes}
373 }
374 \end{table}
375
376 \subsection{Ready lens settings -- left}
377
378 The \autoref{tab:tab_configuracoes_lentesL} presents all the ready-made lens settings provided by the package.
379
380 \begin{table}[ht]
381 \centering
382 \captionbox{All lens settings ready with object on left\label{tab:tab_configuracoes_lentesL}}[\linewidth]{
383 \input{input_tab_configuracoes_lentesL}
384 }
385 \end{table}
386
387 \subsection{Constituent commands}
388
389 The command that calculates the position $p^{\prime}$ and height $i$ of the image with object on the right is:
390 \begin{itemize}
391 \item \verb|\lensMath{f}{p}{o}{epsilon}{yM}|.
392 \end{itemize}
393
394 In turn, the command that calculates the coordinates of the image with the object on the left is:
395 \begin{itemize}
396 \item \verb|\lensMathL{f}{p}{o}{epsilon}{yM}|,
397 \end{itemize}
398 nonetheless, the change in the nomenclature of the commands that draw the lenses is just the addition of the letter $L$ after the word \enquote{Gauss}.
399
400 The following commands draw the main components of the diagram,
401 \begin{itemize}
402 \item lens design: \verb|\lensBase{f}{yM}{xL}{xR}|;
403 \item notable points drawing: \verb|\lensPts{v}{f}{a}|;
404 \item notable ray drawing: \verb|\lensRays[arrows]{p}{pp}{o}{i}|.
405 \end{itemize}
406
407 \subsection{Examples of each possible lens case}
408
409 \subsubsection{Convergent}
410
411 Figures from \ref{fig:conv01} to \ref{fig:conv05} present the 5 possible cases of positioning an object in front of a converging lens.
412
413 % \autoref{fig:conv02} ... \autoref{fig:conv03} ... \autoref{fig:conv04} ... \autoref{fig:conv05} ...
414
415 \begin{figure}[!ht]
416 \centering
417 {\scriptsize \verb|\lensSphGaussFixedCoord{2}{5}{1.5}{0.4}{2}{-4}{4}{(2,-1.5)}|}
418 \captionbox{Case 1, object far from mirror, beyond center of curvature\label{fig:conv01}}[\linewidth]{
419 \adjustbox{height=3cm}{\lensSphGaussFixedCoord{2}{5}{1.5}{0.4}{2}{-4}{4}{(2,-1.5)}}
420 }
421 \end{figure}
422
423 \begin{figure}[!ht]
424 \centering
425 {\scriptsize \verb|\lensSphGaussFixedCoord{2}{4}{1.5}{0.4}{2}{-4}{4}{(2,-1.5)}|}
426 \captionbox{Case 2, object over anti-main object\label{fig:conv02}}[\linewidth]{
427 \adjustbox{height=3cm}{\lensSphGaussFixedCoord{2}{4}{1.5}{0.4}{2}{-4}{4}{(2,-1.5)}}
428 }
429 \end{figure}
430
431 \begin{figure}[!ht]
432 \centering
433 {\scriptsize \verb|\lensSphGaussFixedCoord{2}{3.5}{1.5}{0.4}{2.5}{-4}{4}{(2,-1.5)}|}
434 \captionbox{Case 3, object between anti-main object and focus object\label{fig:conv03}}[\linewidth]{
435 \adjustbox{height=3cm}{\lensSphGaussFixedCoord{2}{3.5}{1.5}{0.4}{2.5}{-4}{4}{(2,-1.5)}}
436 }
437 \end{figure}
438
439 \begin{figure}[!ht]
440 \centering
441 {\scriptsize \verb|\lensSphGaussFixedCoord{2}{2}{1.5}{0.4}{2}{-5}{5}{(2,-1)}|}
442 \captionbox{Case 4, object over object focus (or less than a distance $\varepsilon \to 0$)\label{fig:conv04}}[\linewidth]{
443 \adjustbox{height=3cm}{\lensSphGaussFixedCoord{2}{2}{1.5}{0.4}{2}{-5}{5}{(2,-1)}}
444 }
445 \end{figure}
446
447 \begin{figure}[!ht]
448 \centering
449 {\scriptsize \verb|\lensSphGaussFixedCoord{2}{1.2}{1}{0.4}{3}{-4}{4}{(1.5,-1.5)}|}
450 \captionbox{Case 5, object between focus object and optical center of lens\label{fig:conv05}}[\linewidth]{
451 \adjustbox{height=3cm}{\lensSphGaussFixedCoord{2}{1.2}{1}{0.4}{3}{-4}{4}{(1.5,-1.5)}}
452 }
453 \end{figure}
454
455 \subsubsection{Divergent}
456
457 \autoref{fig:dive} presents two different positions of the single case of positioning an object in front of a diverging lens.
458
459 \begin{figure}[!ht]
460 \centering
461 \begin{minipage}[c]{0.45\linewidth}
462 \centering{\tiny \verb|\lensSphGaussFixed[50]{-2}{2}{2}{0.4}{2.5}{-4}{4}|}
463 \end{minipage} %
464 \begin{minipage}[c]{0.45\linewidth}
465 \centering{\tiny \verb|\lensSphGaussFixed[50]{-2}{4}{2}{0.4}{2.5}{-4}{4}|}
466 \end{minipage}
467 \captionbox{Single case, object located in front of the lens, at any distance from it\label{fig:dive}}[\linewidth]{
468 \subcaptionbox{Between focus and vertex}{
469 \adjustbox{height=3cm}{\lensSphGaussFixed[50]{-2}{2}{1.5}{0.4}{2.5}{-3}{3}}
470 }\quad\quad\quad
471 \subcaptionbox{Beyond the center of curvature}{
472 \adjustbox{height=3cm}{\lensSphGaussFixed[50]{-2}{4}{1.5}{0.4}{2.5}{-3}{3}}
473 }
474 }
475 \end{figure}
476
477 \subsection{Equivalence between commands for lenses with objects on the right and on the left}
478
479 \autoref{fig:equiv_conv} presents the equivalence between the commands that calculate and draw the image using converging lenses depending on the location of the object.
480
481 \begin{figure}[!ht]
482 \centering
483 \begin{minipage}[c]{0.45\linewidth}
484 \centering{\tiny \verb|\lensSphGaussFixedCoord{2}{6}{1.5}{0.4}{2}{-4.2}{4.2}{(2,-1.5)}|}
485 \end{minipage} %
486 \begin{minipage}[c]{0.45\linewidth}
487 \centering{\tiny \verb|\lensSphGaussLFixedCoord{2}{-6}{1.5}{0.4}{2}{-4.2}{4.2}{(-4,-1.5)}|}
488 \end{minipage}
489 \captionbox{Equivalence between commands for converging lenses\label{fig:equiv_conv}}[\linewidth]{
490 \subcaptionbox{Command for object on the right}{
491 \adjustbox{height=2.8cm}{\lensSphGaussFixedCoord{2}{6}{1.2}{0.4}{2}{-3}{4.2}{(2,-1.5)}}
492 }\hfill
493 \subcaptionbox{Command for object on the left}{
494 \adjustbox{height=2.8cm}{\lensSphGaussLFixedCoord{2}{-6}{1.2}{0.4}{2}{-4.2}{3}{(-5,-1.5)}}
495 }
496 }
497 \end{figure}
498
499 \autoref{fig:equiv_dive} presents the equivalence between the commands that calculate and draw the image using diverging lenses depending on the location of the object.
500
501 \begin{figure}[!ht]
502 \centering
503 \begin{minipage}[c]{0.45\linewidth}
504 \centering{\tiny \verb|\lensSphGaussFixedCoord{2}{6}{1.5}{0.4}{2}{-4.2}{4.2}{(2,-1.5)}|}
505 \end{minipage}%
506 \begin{minipage}[c]{0.45\linewidth}
507 \centering{\tiny \verb|\lensSphGaussLFixedCoord{2}{-6}{1.5}{0.4}{2}{-4.2}{4.2}{(-4,-1.5)}|}
508 \end{minipage}
509 \captionbox{Equivalence between commands for diverging lenses\label{fig:equiv_dive}}[\linewidth]{
510 \subcaptionbox{Command for object on the right}{
511 \adjustbox{height=2.8cm}{\lensSphGaussFixedCoord{-2}{4}{1.2}{0.4}{2}{-2.5}{2.5}{(1,-1.5)}}
512 }\hfill
513 \subcaptionbox{Command for object on the left}{
514 \adjustbox{height=2.8cm}{\lensSphGaussLFixedCoord{-2}{-4}{1.2}{0.4}{2}{-2.5}{2.5}{(-5,-1.5)}}
515 }
516 }
517 \end{figure}
518
519 \subsection{Animation}
520
521 The basic syntax is the same as that used for mirror by replacing the mirror command with the lens command.
522
523 \subsubsection{Convergent}
524
525 \autoref{fig:anim_len_conv} presents an animation containing the movement of an object close to a converging lens.
526
527 \begin{figure}[!ht]
528 \centering
529 \captionbox{Animation of object approaching a converging lens\label{fig:anim_len_conv}}[\linewidth]{
530 \adjustbox{width=0.6\linewidth}{
531 \begin{animateinline}[poster=first, controls, palindrome, bb=-5 -5 50 50]{10}
532 \multiframe{100}{rx=0.5+0.05}{
533 \lensSphGaussFixed[50]{2}{6-\rx}{2}{0.4}{11}{-12.5}{8.5}
534 }
535 \end{animateinline}
536 }
537 }
538 \end{figure}
539
540 \subsubsection{Divergent}
541
542 \autoref{fig:anim_len_dive} presents an animation containing the movement of an object close to a diverging lens.
543
544 \begin{figure}[!ht]
545 \centering
546 \captionbox{Animation of object approaching a diverging lens\label{fig:anim_len_dive}}[\linewidth]{
547 \adjustbox{width=0.6\linewidth}{
548 \begin{animateinline}[poster=first, controls, palindrome, bb=-5 -5 50 50]{10}
549 \multiframe{100}{rx=0.5+0.05}{
550 \lensSphGaussFixed[50]{-2}{6-\rx}{2}{0.4}{2.5}{-4.5}{6}
551 }
552 \end{animateinline}
553 }
554 }
555 \end{figure}
556
557 \section{Other interesting packages}
558
559 Below are interesting \textit{links} to other packages with optics implementations, as well as sources for the equations and modeling used.
560
561 \begin{FHZmirroLensTcolorbox}
562 \begin{enumerate}
563 \item \href{https://tex.stackexchange.com/q/33460/140133}{\textbf{TeX StackExchange} -- TikZ library for optics?}
564 \item \href{https://tex.stackexchange.com/q/623201/140133}{\textbf{TeX StackExchange} -- Geometrical optics}
565 \item \href{https://ctan.org/pkg/tikz-optics}{{\textbf{CTAN}} -- tikz-optics}
566 \item \href{https://ctan.org/pkg/pst-mirror}{\textbf{CTAN} -- pst-mirror}
567 \item \href{https://ctan.org/pkg/simpleoptics}{\textbf{CTAN} -- simpleoptics}
568
569 \item \href{https://youtu.be/efPZ5uSDeuI}{\textbf{YouTube} -- The Organic Chemistry Tutor -- Spherical Mirrors \& The Mirror Equation - Geometric Optics}
570 \item \href{http://hyperphysics.phy-astr.gsu.edu/hbase/geoopt/mireq.html}{hyperphysics -- Spherical Mirror Equation}
571
572 \item \href{http://hyperphysics.phy-astr.gsu.edu/hbase/geoopt/lenseq.html}{hyperphysics -- lenseq}
573 \item \href{https://www.plymouth.ac.uk/uploads/production/document/path/3/3754/PlymouthUniversity_MathsandStats_outreach_lenses.pdf}{plymouth -- lenses}
574 \item \href{https://www.khanacademy.org/science/in-in-class10th-physics/in-in-10th-physics-light-reflection-refraction/in-in-lens-formula-magnification/v/lens-formula}{khanacademy -- lens formula}
575 \end{enumerate}
576 \end{FHZmirroLensTcolorbox}
577
578 \section{History and versions}
579
580 \begin{FHZmirroLensTcolorbox}
581 \begin{enumerate}[leftmargin=3.5cm]
582 \item[1.0.0 (2022-12-24):] Package creation.
583 \item[1.0.1 (2022-12-27):] Small corrections on function argument input order in \verb|\mirrorRays| and in \verb|\lensRays|.
584 \item[1.0.2 (2023-01-08):] Revised the English version and removed unnecessary semicolons (suggested by Denis Bitouzé).
585 \end{enumerate}
586 \end{FHZmirroLensTcolorbox}
587
588 \end{document}