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 % 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-05-23 @ 03:46

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.