Explaining rainbows with refraction and internal reflection, including pileup at angle 42°.
Edit and compile if you like:
% Author: Izaak Neutelings (June 2020)% Inspiration:% https://www.researchgate.net/figure/a-Refractive-index-and-b-dispersion-of-bulky-soft-glasses-NC21-LLF1-SF6-and-F2-As_fig1_236110630% https://link.springer.com/article/10.1007/s11082-014-9979-y\documentclass[border=3pt,tikz]{standalone}\usepackage{siunitx}\usepackage[outline]{contour} % glow around text\usetikzlibrary{calc}\usetikzlibrary{intersections}\usetikzlibrary{decorations.markings}\usetikzlibrary{fadings}\usetikzlibrary{angles,quotes} % for pic (angle labels)\usetikzlibrary{decorations.pathreplacing} % for curly braces\tikzset{>=latex} % for LaTeX arrow head\contourlength{1.7pt}\newcommand\degree{^\circ}\colorlet{myblue}{blue!80!black}\colorlet{myred}{black!50!red}\colorlet{watercol}{blue!70!cyan!50}\tikzstyle{myarr}=[-{Latex[length=3,width=2]}]\tikzstyle{water}=[ball color=watercol]\tikzset{beam/.style={very thick,line cap=round,line join=round},}\begin{document}% DROPLET refraction & reflection\begin{tikzpicture}\def\L{2.4} % length of ray outside droplet\def\R{1.8} % droplet radius\def\na{1.0} % air\def\nw{1.33} % water\def\alphI{150} % A: incident (180-90)\pgfmathsetmacro\thetI{180-\alphI} % theta_1: incident\pgfmathsetmacro\thetII{asin(\na/\nw*sin(\thetI)} % theta_2: air -> water & reflection\pgfmathsetmacro\alphII{\alphI+2*\thetII-180} % C: reflected
Click to download: optics_rainbow.tex • optics_rainbow.pdf
Open in Overleaf: optics_rainbow.tex