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