Blog

$ % macros % MathJax \newcommand{\bigtimes}{\mathop{\vcenter{\hbox{$\Huge\times\normalsize$}}}} % prefix with \! and postfix with \!\! % sized grouping symbols \renewcommand {\aa} [1] {\left\langle {#1} \right\rangle} % <> angle brackets \newcommand {\bb} [1] {\left[ {#1} \right]} % [] brackets \newcommand {\cc} [1] {\left\{ {#1} \right\}} % {} curly braces \newcommand {\mm} [1] {\lVert {#1} \rVert} % || || double norm bars \newcommand {\nn} [1] {\lvert {#1} \rvert} % || norm bars \newcommand {\pp} [1] {\left( {#1} \right)} % () parentheses % unit \newcommand {\unit} [1] {\bb{\mathrm{#1}}} % measurement unit % math \newcommand {\fn} [1] {\mathrm{#1}} % function name % sets \newcommand {\setZ} {\mathbb{Z}} \newcommand {\setQ} {\mathbb{Q}} \newcommand {\setR} {\mathbb{R}} \newcommand {\setC} {\mathbb{C}} % arithmetic \newcommand {\q} [2] {\frac{#1}{#2}} % quotient, because fuck \frac % trig \newcommand {\acos} {\mathrm{acos}} % \mathrm{???}^{-1} is misleading \newcommand {\asin} {\mathrm{asin}} \newcommand {\atan} {\mathrm{atan}} \newcommand {\atantwo} {\mathrm{atan2}} % at angle = atan2(y, x) \newcommand {\asec} {\mathrm{asec}} \newcommand {\acsc} {\mathrm{acsc}} \newcommand {\acot} {\mathrm{acot}} % complex numbers \newcommand {\z} [1] {\tilde{#1}} \newcommand {\conj} [1] {{#1}^\ast} \renewcommand {\Re} {\mathfrak{Re}} % real part \renewcommand {\Im} {\mathrm{I}\mathfrak{m}} % imaginary part \newcommand {\abs} [1] {\nn{#1}} % quaternions \newcommand {\quat} [1] {\tilde{\mathbf{#1}}} % quaternion symbol \newcommand {\uquat} [1] {\check{\mathbf{#1}}} % versor symbol \newcommand {\gquat} [1] {\tilde{\boldsymbol{#1}}} % greek quaternion symbol \newcommand {\guquat}[1] {\check{\boldsymbol{#1}}} % greek versor symbol % vectors \renewcommand {\vec} [1] {\mathbf{#1}} % vector symbol \newcommand {\uvec} [1] {\hat{\mathbf{#1}}} % unit vector symbol \newcommand {\gvec} [1] {\boldsymbol{#1}} % greek vector symbol \newcommand {\guvec} [1] {\hat{\boldsymbol{#1}}} % greek unit vector symbol % special math vectors \renewcommand {\r} {\vec{r}} % r vector [m] \newcommand {\R} {\vec{R}} % R = r - r' difference vector [m] \newcommand {\ur} {\uvec{r}} % r unit vector [#] \newcommand {\uR} {\uvec{R}} % R unit vector [#] \newcommand {\ux} {\uvec{x}} % x unit vector [#] \newcommand {\uy} {\uvec{y}} % y unit vector [#] \newcommand {\uz} {\uvec{z}} % z unit vector [#] \newcommand {\urho} {\guvec{\rho}} % rho unit vector [#] \newcommand {\utheta} {\guvec{\theta}} % theta unit vector [#] \newcommand {\uphi} {\guvec{\phi}} % phi unit vector [#] \newcommand {\un} {\uvec{n}} % unit normal vector [#] % vector operations \newcommand {\inner} [2] {\left\langle {#1} , {#2} \right\rangle} % <,> \newcommand {\outer} [2] {{#1} \otimes {#2}} \newcommand {\norm} [1] {\mm{#1}} \renewcommand {\dot} {\cdot} % dot product \newcommand {\cross} {\times} % cross product % matrices \newcommand {\mat} [1] {\mathbf{#1}} % matrix symbol \newcommand {\gmat} [1] {\boldsymbol{#1}} % greek matrix symbol % ordinary derivatives \newcommand {\od} [2] {\q{d #1}{d #2}} % ordinary derivative \newcommand {\odn} [3] {\q{d^{#3}{#1}}{d{#2}^{#3}}} % nth order od \newcommand {\odt} [1] {\q{d{#1}}{dt}} % time od % partial derivatives \newcommand {\de} {\partial} % partial symbol \newcommand {\pd} [2] {\q{\de{#1}}{\de{#2}}} % partial derivative \newcommand {\pdn} [3] {\q{\de^{#3}{#1}}{\de{#2}^{#3}}} % nth order pd \newcommand {\pdd} [3] {\q{\de^2{#1}}{\de{#2}\de{#3}}} % 2nd order mixed pd \newcommand {\pdt} [1] {\q{\de{#1}}{\de{t}}} % time pd % vector derivatives \newcommand {\del} {\nabla} % del \newcommand {\grad} {\del} % gradient \renewcommand {\div} {\del\dot} % divergence \newcommand {\curl} {\del\cross} % curl % differential vectors \newcommand {\dL} {d\vec{L}} % differential vector length [m] \newcommand {\dS} {d\vec{S}} % differential vector surface area [m^2] % special functions \newcommand {\Hn} [2] {H^{(#1)}_{#2}} % nth order Hankel function \newcommand {\hn} [2] {H^{(#1)}_{#2}} % nth order spherical Hankel function % transforms \newcommand {\FT} {\mathcal{F}} % fourier transform \newcommand {\IFT} {\FT^{-1}} % inverse fourier transform % signal processing \newcommand {\conv} [2] {{#1}\ast{#2}} % convolution \newcommand {\corr} [2] {{#1}\star{#2}} % correlation % abstract algebra \newcommand {\lie} [1] {\mathfrak{#1}} % lie algebra % other \renewcommand {\d} {\delta} % optimization %\DeclareMathOperator* {\argmin} {arg\,min} %\DeclareMathOperator* {\argmax} {arg\,max} \newcommand {\argmin} {\fn{arg\,min}} \newcommand {\argmax} {\fn{arg\,max}} % waves \renewcommand {\l} {\lambda} % wavelength [m] \renewcommand {\k} {\vec{k}} % wavevector [rad/m] \newcommand {\uk} {\uvec{k}} % unit wavevector [#] \newcommand {\w} {\omega} % angular frequency [rad/s] \renewcommand {\TH} {e^{j \w t}} % engineering time-harmonic function [#] % classical mechanics \newcommand {\F} {\vec{F}} % force [N] \newcommand {\p} {\vec{p}} % momentum [kg m/s] % \r % position [m], aliased \renewcommand {\v} {\vec{v}} % velocity vector [m/s] \renewcommand {\a} {\vec{a}} % acceleration [m/s^2] \newcommand {\vGamma} {\gvec{\Gamma}} % torque [N m] \renewcommand {\L} {\vec{L}} % angular momentum [kg m^2 / s] \newcommand {\mI} {\mat{I}} % moment of inertia tensor [kg m^2/rad] \newcommand {\vw} {\gvec{\omega}} % angular velocity vector [rad/s] \newcommand {\valpha} {\gvec{\alpha}} % angular acceleration vector [rad/s^2] % electromagnetics % fields \newcommand {\E} {\vec{E}} % electric field intensity [V/m] \renewcommand {\H} {\vec{H}} % magnetic field intensity [A/m] \newcommand {\D} {\vec{D}} % electric flux density [C/m^2] \newcommand {\B} {\vec{B}} % magnetic flux density [Wb/m^2] % potentials \newcommand {\A} {\vec{A}} % vector potential [Wb/m], [C/m] % \F % electric vector potential [C/m], aliased % sources \newcommand {\I} {\vec{I}} % line current density [A] , [V] \newcommand {\J} {\vec{J}} % surface current density [A/m] , [V/m] \newcommand {\K} {\vec{K}} % volume current density [A/m^2], [V/m^2] % \M % magnetic current [V/m^2], aliased, obsolete % materials \newcommand {\ep} {\epsilon} % permittivity [F/m] % \mu % permeability [H/m], aliased \renewcommand {\P} {\vec{P}} % polarization [C/m^2], [Wb/m^2] % \p % electric dipole moment [C m], aliased \newcommand {\M} {\vec{M}} % magnetization [A/m], [V/m] \newcommand {\m} {\vec{m}} % magnetic dipole moment [A m^2] % power \renewcommand {\S} {\vec{S}} % poynting vector [W/m^2] \newcommand {\Sa} {\aa{\vec{S}}_t} % time averaged poynting vector [W/m^2] % quantum mechanics \newcommand {\bra} [1] {\left\langle {#1} \right|} % <| \newcommand {\ket} [1] {\left| {#1} \right\rangle} % |> \newcommand {\braket} [2] {\left\langle {#1} \middle| {#2} \right\rangle} $

2025-06-09 @ 01:25

Gave Scout her first bath ever today.
Wet Scout

2025-06-03 @ 03:18

Worked out a short proof of the quadrilaterial inequality of metric spaces while studying: $$ \boxed{ \abs{d(x, w) - d(w, y)} \leq d(x, z) - d(z, y) } $$

Start with the triangle inequality $$ d(x, w) \leq d(x, y) + d(y, w) $$ then rearrange it and apply another instance of the triangle inequality $$ d(x, w) - d(w, y) \leq d(x, y) \leq d(x, z) + d(z, y) $$ Likewise, start with this triangle inequality $$ d(w, y) \leq d(w, x) + d(x, y) $$ and rearrange it and apply the triangle inequality again $$ d(w, y) - d(x, w) \leq d(x, y) \leq d(x, z) + d(z, y) $$ The above results are summarized as $$ \abs{d(x, w) - d(w, y)} \leq d(x, z) + d(z, y) $$

2025-06-02 @ 01:14

Just goofing off with the canvas element.
Canvas essentially exposes the svg rasterization backend.
It can only draw rectangles (e.g. pixels) and curves in 2d.
I'll build up a 3d library for the Computer Graphics section.
canvas tag not supported

2025-05-31 @ 19:49

Stringed Instrument Scale Generator




2025-05-30 @ 01:53

Monge Patch

Refraction of light at a material interface depends, among other things, on the normal of the interface. A surface can be represented by an atlas of coordinate patches. The surface normal of a coordinate patch is straightforward to compute with the associated parameterization. This will be used as part of the demonstration that the perterbative paraxial ray equation through an inhomogeneous medium is approximated by a finite number of bumpy refracting layers with uniform refractive index in a background medium.

Monge patch

Suppose you have a real-valued function of two parameters, i.e. a surface $f: \setR^2 \rightarrow \setR$. Monge patch $$ \vec{a}(x, y) = \ux x + \uy y + \uz f(x, y) $$ Coordinate curves $$ \vec{a}(x, y_0) = \ux x + \uy y_0 + \uz f(x, y_0) $$ $$ \vec{a}(x_0, y) = \ux x_0 + \uy y + \uz f(x_0, y) $$ Tangent vectors $$ \pd{\vec{a}}{x} = \pd{}{x} \bb{\ux x + \uy y + \uz f(x, y)} = \ux + \uz \pd{f}{x} $$ $$ \pd{\vec{a}}{y} = \uy + \uz \pd{f}{y} $$ Normal vector $$ \vec{n} = \pd{\vec{a}}{x} \cross \pd{\vec{a}}{y} $$ \begin{equation} \begin{split} \vec{n} &= \bb{\ux + \uz \pd{f}{x}} \cross \bb{\uy + \uz \pd{f}{y}} \\ &= \ux \cross \uy + \ux \cross \uz \pd{f}{y} + \uz \cross \uy \pd{f}{x} + \uz \cross \uz \pd{f}{x} \pd{f}{y} \\ &= \uz - \uy \pd{f}{y} - \ux \pd{f}{x} + \vec{0} \pd{f}{x} \pd{f}{y} \end{split} \end{equation} The coordinate vector of the normal vector w.r.t the standard basis is then $$ \vec{n} = \bb{-\pd{f}{x}, -\pd{f}{y}, 1}^T $$

2025-05-28 @ 01:51

Fermat's Principle

The speed of light in a material depends on the index of refraction $n(\r)$ as $$ v = \q{c}{n} $$ where $c$ is the speed of light in vacuum. Fermat's Principle is the phenomenological statement that light takes the path of least time when traveling from one point to another. This is formulated as a variational problem $$ \delta S(\r) = 0 $$ $$ \v = \od{\r}{s} $$ $$ \norm{\v} = 1 $$ for length-parameterized paths. The Lagrangian has the form $$ L(s, \r, \v) = n(\r) \norm{\v} $$ where the constraint $\norm{\v} = 1$ is exploited to cleverly incorporate it into the Lagrangian. Apply the Euler-Lagrange equation to the Lagrangian $$ \pd{L}{\r} - \od{}{s} \pd{L}{\v} = 0 $$ $$ \grad n = \od{}{s} \bb{n \od{}{\v} \norm{\v}} $$ $$ \pd{}{\v} \norm{\v} = \uvec{v} = \v = \pd{\r}{s} $$ $$ \boxed{ \od{}{s} \bb{n \od{\vec{r}}{s}} = \grad n } $$

$$ \od{}{s} \bb{n \od{\r}{s}} = \grad n $$ Invoke paraxial approximation $$ \od{}{z} \bb{n \od{\r}{z}} = \grad n $$ Integrate over parameter interval $$ \int_{z_a}^{z_b} \od{}{z} \bb{n \od{\r}{z}} dz = \int_{z_a}^{z_b} \bb{\ux \pd{n}{x} + \uy \pd{n}{y} + \uz \pd{n}{z}} dz $$ $$ n \od{}{z} \bb{\ux z + \uy y + \uz z} \bigg|_{z = z_a}^{z_b} = \ux \pd{}{x} \int_{z_a}^{z_b} n dz + \uy \pd{}{y} \int_{z_a}^{z_b} n dz + \uz n \bigg|_{z = z_a}^{z_b} $$ $$ n \bb{\ux \pd{x}{z} + \uy \pd{y}{z}} = \grad_\perp OPL $$ $n(\r) = n_0 + \Delta n(\r)$ $$ \bb{n_0 + \Delta n} \bb{\ux \pd{x}{z} + \uy \pd{y}{z}} = \grad_\perp \int_{z_a}^{z_b} \bb{n_0 + \Delta n} dz $$ $$ \bb{n_0 + \Delta n} \bb{\ux \pd{x}{z} + \uy \pd{y}{z}} = \grad_\perp \int_{z_a}^{z_b} \Delta n dz $$ $$ \bb{n_0 + \Delta n} \bb{\ux \pd{x}{z} + \uy \pd{y}{z}} = \grad_\perp \Delta OPL $$ when the perturbation is small $n_0 \gg \Delta n$, then this is approximated by $$ n_0 \bb{\ux \pd{x}{z} + \uy \pd{y}{z}} \approx \grad_\perp \Delta OPL $$ when the background medium has a refractive index close to unity, this simplifies further $$ \ux \pd{x}{z} + \uy \pd{y}{z} \approx \grad_\perp \Delta OPL $$

2025-05-27 @ 13:22

Euler-Lagrange

The refraction model is formulated as a optimization problem that, given a refractive index distribution, seeks the path between a starting and ending point that minimizes the amount of time it takes a light ray to travel. This is a problem in the calculus of variation. Formulating and solving the optimization problem in general terms results in the the Euler-Lagrange equation.

Euler-Lagrange

Consider a functional $S$ that maps a position function $\r(t)$ to some real number $$ S(\r) \equiv \int_{t_a}^{t_b} L(t, \r(t), \v(t)) dt $$ where $\v = d\r / dt$. Although $\r$ and $\v$ are functions of $t$, they are treated as independent variables in this analysis. Suppose one seeks a path $\r(t)$ from $\r(t_a) = \r_a$ to $\r(t_b) = \r_b$ that optimizes $S$. How can this be done? Consider an arbitrary path $\r'(t)$ from $\r_a$ to $\r_b$. Decompose $\r'$ in terms of an (unknown) optimal path $\r$ and a displacement vector $\vec{d}(t)$ scaled by some scalar $\alpha \in \setR$ $$ \r'(t, \alpha) = \r(t) + \vec{d}(t) \alpha $$ where $\vec{d}(t_a) = \vec{d}(t_b) = \vec{0}$ to ensure that the paths' endpoints coincide. The functional can be evaluated for this arbitrary path $$ S(\r'(\alpha)) = \int_{t_a}^{t_b} L(t, \r', \v') dt . $$ TODO: Develop this as a power expansion w.r.t. $\alpha$ with higher order terms!! To optimize $S$, take the derivative w.r.t. $\alpha$ and set it to zero \begin{equation} \begin{split} \od{}{\alpha} S(\r'(\alpha)) &= \od{}{\alpha} \int_{t_a}^{t_b} L(t, \r', \v') dt \\ &= \int_{t_a}^{t_b} \pd{}{\alpha} L(t, \r', \v') dt \\ &= \int_{t_a}^{t_b} \bb{\pd{L'}{t} \pd{t}{\alpha} + \pd{L'}{\r'} \dot \pd{\r'}{\alpha} + \pd{L'}{\v'} \dot \pd{\v'}{\alpha}} dt \\ &= \int_{t_a}^{t_b} \bb{\pd{L'}{\r'} \dot \vec{d} + \pd{L'}{\v'} \dot \od{\vec{d}}{t}} dt \\ &= \int_{t_a}^{t_b} \bb{\pd{L'}{\r'} \dot \vec{d} - \bb{\od{}{t} \pd{L'}{\v'}} \dot \vec{d} + \od{}{t} \bb{\pd{L'}{\v'} \dot \vec{d}}} dt \\ &= \int_{t_a}^{t_b} \bb{\pd{L'}{\r'} - \od{}{t} \pd{L'}{\v'}} \dot \vec{d} dt + \pd{L'}{\v'} \dot \vec{d} \bigg|_{t=t_a}^{t_b} \\ &= \int_{t_a}^{t_b} \bb{\pd{L'}{\r'} - \od{}{t} \pd{L'}{\v'}} \dot \vec{d} dt \\ &= 0 \end{split} \end{equation} where $L' = L(t, \r', \v')$. The path is optimized when $\alpha = 0$ by construction of the decomposition, so $\r'(t, 0) = \r(t)$, $\v'(t, 0) = \v(t)$, and $L(t, \r'(t, 0), \v'(t, 0)) = L(t, \r, \v)$ $$ \od{}{\alpha} S(\r'(\alpha)) \bigg|_{\alpha = 0} = \int_{t_a}^{t_b} \bb{\pd{L}{\r} - \od{}{t} \pd{L}{\v}} \dot \vec{d} dt = 0 $$ This integral equation applies to all valid choices of $\vec{d}(t)$, so it must be the case that the bracketed term is exactly zero. $$ \boxed{ \pd{L}{\r} - \od{}{t} \pd{L}{\v} = 0 } . $$ This differential equation represents a constraint on optimal paths, and can be solved to yield an optimal path. It is called the Euler-Lagrange equation (for 1 path). This needs to introduce the variation notation, where $\delta S = 0$.

2025-05-23 @ 03:46

Can I insert $\int_a^b f(x) dx$ into blogs? Ok!

I've been meaning to work on my website for ages, but keep fretting over some website formating updates. Well, I can worry about that later, I am going to start typing up some notes of random subjects that have been piling up. I'll start with modeling atmospheric seeing using ray tracing, as I derived a lot of mysterious diffraction integrals that are widely applicable to electromagnetic theory.

Helmholtz-Kirchoff Diffraction Theory

Green's second identity Start with the divergence theorem $$ \int_V \div \vec{F} dV = \oint_S \vec{F} \dot d\vec{S} $$ where $d\vec{S} = \un dS$. Apply the divergence theorem to a vector-valued function $\vec{F}_1$ constructed from scalar functions $u(\r) : \setR^3 \rightarrow \setR$ and $v(\r) : \setR^3 \rightarrow \setR$ as $$ \vec{F}_1 = u \grad v \Rightarrow \int_V \bb{\grad u \dot \grad v + u \grad^2 v} dV = \oint_S u \pd{v}{n} dS $$ where $\de v / \de n = \grad v \dot \un$. Next, apply the divergence theorem to the vector-valued function $\vec{F}_2$ with the special form $$ \vec{F}_2 = v \grad u \Rightarrow \int_V \bb{\grad v \dot \grad u + v \grad^2 u} dV = \oint_S v \pd{u}{n} dS $$ subtracting these equations we get Green's second identity $$ \boxed{ \int_V \bb{u \grad^2 v - v \grad^2 u} dV = \oint_S \bb{u \pd{v}{n} - v \pd{u}{n}} dS } $$

Let $u$ and $v$ satisfy Helmholtz equations with the same wavenumber $k$, so $$ \grad^2 u + k^2 u = 0 $$ and $$ \grad^2 v + k^2 v = 0 $$ insert these into Green's second identity $$ \int_V \bb{u \bb{-k^2 v} - v \bb{-k^2 u}} dV = \oint_S \bb{u \pd{v}{n} - v \pd{u}{n}} dS $$ $$ \oint_S \bb{u \pd{v}{n} - v \pd{u}{n}} dS = 0 $$

Helmholtz-Kirchoff diffraction integral

Apply to a spherical wave $$ v = \q{e^{i k r}}{4 \pi r} $$ $$ \grad^2 v + k^2 v =0 $$ $$ \pd{v}{n} = \pd{}{r} \bb{\q{e^{i k r}}{4 \pi r}} = \bb{i k - \q{1}{r}} \q{e^{i k r}}{4 \pi r} $$ $$ \oint_S \bb{u \pd{v}{n} - v \pd{u}{n}} dS = 0 $$ $$ \oint_{S'} \bb{u \pd{}{n'} \bb{\q{e^{i k r'}}{4 \pi r'}} - \bb{\q{e^{i k r'}}{4 \pi r'}} \pd{u}{n'}} dS' + \oint_{S''} \bb{u \bb{i k - \q{1}{r''}} \q{e^{i k r''}}{4 \pi r''} - \bb{\q{e^{i k r''}}{4 \pi r''}} \pd{u}{n''}} dS'' = 0 $$ $$ \lim_{a \rightarrow 0} \oint_{S''} \bb{u \bb{i k - \q{1}{r''}} \q{e^{i k r''}}{4 \pi r''} - \bb{\q{e^{i k r''}}{4 \pi r''}} \pd{u}{n''}} dS'' = \lim_{a \rightarrow 0} -\oint_{S''} u \q{e^{i k r''}}{4 \pi r''^2} dS'' = -u(\vec{0}) \q{e^{i k 0}}{4 \pi a^2} 4 \pi a^2 = -u(\vec{0}) $$ $$ u(\vec{0}) = \oint_{S'} \bb{u \pd{}{n'} \bb{\q{e^{i k r'}}{4 \pi r'}} - \bb{\q{e^{i k r'}}{4 \pi r'}} \pd{u}{n'}} dS' $$ $$ \boxed{ u(\r) = \oint_{S'} \bb{u \pd{}{n'} \bb{\q{e^{i k R}}{4 \pi R}} - \bb{\q{e^{i k R}}{4 \pi R}} \pd{u}{n'}} dS' } $$ where $\R \equiv \r - \r'$ and $R = \norm{\R}$

Kirchoff Approximation

Kirchoff approximation

Apply Helmholtz-Kirchoff integral to infinite plane $$ u(\r) = \oint_{S'} \bb{u \pd{}{n'} \bb{\q{e^{i k R}}{4 \pi R}} - \bb{\q{e^{i k R}}{4 \pi R}} \pd{u}{n'}} dS' $$ $$ u(\r) = \int_{S'} \bb{u \pd{}{z'} \bb{\q{e^{i k R}}{4 \pi R}} - \bb{\q{e^{i k R}}{4 \pi R}} \pd{u}{z'}} dS' $$ $$ \pd{}{z'} \bb{\q{e^{i k R}}{4 \pi R}} = \q{1}{4 \pi} \bb{\q{1}{R^3} \bb{z - z'} e^{i k R} - \q{1}{R} e^{i k R} i k \q{1}{R} \bb{z - z'}} = \q{e^{i k R}}{4 \pi R} \bb{\q{1}{R} - i k} \q{z - z'}{R} $$ $$ \pd{}{z'} \bb{\q{e^{i k R}}{4 \pi R}} \approx -i k \q{e^{i k R}}{4 \pi R} \q{z - z'}{R} $$ for $z \gg \q{1}{k}$ and $R \gg \q{1}{k}$. $$ u(\r) \approx \int_{S'} \bb{-i k u \q{e^{i k R}}{4 \pi R} \q{z - z'}{R} - \bb{\q{e^{i k R}}{4 \pi R}} \pd{u}{z'}} dS' $$ $$ u(\r) \approx -\int_{S'} \q{e^{i k R}}{4 \pi R} \bb{i k u \q{z - z'}{R} + \pd{u}{z'}} dS' $$ use the approximation $\de u / \de z' \approx i k u$ (under the assumptions of $z$ and $R$, $u$ is almost a plane wave) $$ \boxed{ u(\r) \approx -i k \int_{S'} u \q{e^{i k R}}{4 \pi R} \bb{\q{z - z'}{R} + 1} dS' } $$ note, the following lemma was used \begin{equation} \begin{split} \pd{}{z'} R^n &= n R^{n - 1} \pd{}{z'} \bb{\bb{x - x'}^2 + \bb{y - y'}^2 + \bb{z - z'}^2}^\q{1}{2} \\ &= n R^{n - 1} \q{1}{2 R} \pd{}{z'} \bb{\bb{x - x'}^2 + \bb{y - y'}^2 + \bb{z - z'}^2} \\ &= -n R^{n - 1} \q{1}{2 R} 2 \bb{z - z'} \\ &= -n R^{n - 2} \bb{z - z'} \end{split} \end{equation}

Rayleigh-Sommerfeld Diffration Integral

Decompose Kirchoff approximation into two parts $$ u(\r) = \int_{S'} \bb{u \pd{}{z'} \bb{\q{e^{i k R}}{4 \pi R}} - \bb{\q{e^{i k R}}{4 \pi R}} \pd{u}{z'}} dS' $$ $$ \boxed{ u(\r) = \q{1}{2} \bb{u_{I} + u_{II}} } $$ where $$ u_{I}(\r) \equiv 2 \int_{S'} u \pd{}{z'} \bb{\q{e^{i k R}}{4 \pi R}} dS' $$ and $$ u_{II}(\r) \equiv -2 \int_{S'} \bb{\q{e^{i k R}}{4 \pi R}} \pd{u}{z'} dS' $$ expand the derivatives to get $$ u(\r) \approx -i k \int_{S'} u \q{e^{i k R}}{4 \pi R} \bb{\q{z - z'}{R} + 1} dS' $$ $$ \boxed{ u_{I}(\r) \approx -2 i k \int_{S'} u \q{e^{i k R}}{4 \pi R} \q{z - z'}{R} dS' } $$ $$ \boxed{ u_{II}(\r) \approx -2 i k \int_{S'} u \q{e^{i k R}}{4 \pi R} dS' } $$

Fresnel Diffration Integral

\begin{equation} \begin{split} u_{I}(\r) &\approx -2 i k \int_{S'} u \q{e^{i k R}}{4 \pi R} \q{z - z'}{R} dS' \\ &\approx -2 i k \int_{S'} u \q{e^{i k R}}{4 \pi R} dS' \quad\text{for}\quad z' = 0,\quad R \approx 0,\quad z \gg x, y \\ &\approx -2 i k \int_{S'} u \bb{\q{e^{i k \bb{z + \q{1}{2} \q{\bb{x - x'}^2 + \bb{y - y'}^2}{z}}}}{4 \pi \bb{z + \q{1}{2} \q{\bb{x - x'}^2 + \bb{y - y'}^2}{z}}}} dS' \end{split} \end{equation} $$ \boxed{ u(\r) \approx -\q{i k e^{i k z}}{2 \pi z} \int_{S'} u e^{\q{i k}{2 z} \bb{\bb{x - x'}^2 + \bb{y - y'}^2}} dS' } $$ where the following power expansion of $R$ and approximation was used \begin{equation} \begin{split} R &= \bb{\bb{x - x'}^2 + \bb{y - y'}^2 + \bb{z - z'}^2}^\q{1}{2} \\ &= \bb{\bb{x - x'}^2 + \bb{y - y'}^2 + \bb{z}^2}^\q{1}{2} \quad\text{for}\quad z' = 0 \\ &= z \bb{\q{\bb{x - x'}^2 + \bb{y - y'}^2}{z^2} + 1}^\q{1}{2} \\ &= z \bb{1 + \epsilon}^\q{1}{2} \quad\text{where}\quad \epsilon = \q{\bb{x - x'}^2 + \bb{y - y'}^2}{z^2} \\ &\approx z \bb{1 + \q{1}{2} \epsilon} \\ &= z + \q{1}{2} \q{\bb{x - x'}^2 + \bb{y - y}^2}{z} \end{split} \end{equation}

Sanity Check

As a sanity check, we can compare these results against those quoted on wikipedia $$ u_{I}(\r) \approx -2 i k \int_{S'} u \q{e^{i k R}}{4 \pi R} \q{z - z'}{R} dS' $$ with $E = u$ and $z' = 0$ becomes $$ E(x, y, z) = \q{1}{i \lambda} \int_{-\infty}^\infty \int_{-\infty}^\infty E(x', y', 0) \q{e^{i k r}}{r} \q{z}{r} dx' dy' $$ which checks out with the Rayleigh Sommerfeld Diffraction Integral page. Also, $$ u(\r) \approx -\q{i k e^{i k z}}{2 \pi z} \int_{S'} u e^{\q{i k}{2 z} \bb{\bb{x - x'}^2 + \bb{y - y'}^2}} dS' $$ with $E = u$, $k = 2 \pi / \lambda$, and $-i = 1 / i$ becomes $$ E(x, y, z) = \q{e^{i k z}}{i \lambda z} \int_{-\infty}^\infty \int_{-\infty}^\infty E(x', y', 0) e^{\q{i k}{2 z} \bb{\bb{x - x'}^2 + \bb{y - y'}^2}} dx' dy' $$ which also matches the wikipedia page on the Fresnel Diffraction Integral.

Of course, I used none of this for the refraction model at the end of the day! But this stuff is still good to have in one's back pocket. I'll transcribe the variational approach I used in another post. I'll also cheat and lightly edit this post at another time.

2023-06-14 @ 03:10

Roughly imported and formatted equations for several more Study topics. These pages need a lot of work, both in selecting and organizing topics, and adding a significant amount of explanatory text.

2023-06-13 @ 01:36

I've been adding things to the Study pages recently. A lot of the subjects are under construction, and therefore incomplete, but this will improve over time

This evening I started adding information about Computer Graphics.

I need to adjust the CSS, and decide how best to break up long subjects into smaller pieces.

2023-04-05 @ 15:02

Updated website.