Skip to content

Commit b153d69

Browse files
committed
Rearrange conventions docs
1 parent 396c574 commit b153d69

File tree

3 files changed

+123
-30
lines changed

3 files changed

+123
-30
lines changed

docs/make.jl

+4
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ makedocs(
3434
"internal.md",
3535
"functions.md",
3636
],
37+
"Conventions" => [
38+
"conventions.md",
39+
"comparisons.md",
40+
],
3741
"Notes" => map(
3842
s -> "notes/$(s)",
3943
sort(readdir(joinpath(@__DIR__, "src/notes")))

docs/src/conventions/conventions.md

+108
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
# Conventions
2+
3+
Here, we work through all the conventions used in this package,
4+
starting from first principles to motivate the choices and ensure that
5+
each step is on firm footing.
6+
7+
## Three-dimensional space
8+
9+
The space we are working in is naturally three-dimensional Euclidean
10+
space, so we start with Cartesian coordinates ``(x, y, z)``. These
11+
also give us the unit basis vectors ``(𝐱, 𝐲, 𝐳)``. Note that these
12+
basis vectors are assumed to have unit norm, but we omit the hats just
13+
to keep the notation simple. Any vector in this space can be written
14+
as
15+
```math
16+
\mathbf{v} = v_x \mathbf{𝐱} + v_y \mathbf{𝐲} + v_z \mathbf{𝐳},
17+
```
18+
in which case the Euclidean norm is given by
19+
```math
20+
\| \mathbf{v} \| = \sqrt{v_x^2 + v_y^2 + v_z^2}.
21+
```
22+
Equivalently, we can write the components of the Euclidean metric as
23+
```math
24+
g_{ij} = \left( \begin{array}{ccc}
25+
1 & 0 & 0 \\
26+
0 & 1 & 0 \\
27+
0 & 0 & 1
28+
\end{array} \right)_{ij}.
29+
```
30+
Note that, because the points of the space are in one-to-one
31+
correspondence with the vectors, we will frequently use a vector to
32+
label a point in space.
33+
34+
We will be working on the sphere, so it will be very convenient to use
35+
spherical coordinates ``(r, \theta, \phi)``. We choose the standard
36+
"physics" conventions for these, in which we relate to the Cartesian
37+
coordinates by
38+
```math
39+
\begin{aligned}
40+
r &= \sqrt{x^2 + y^2 + z^2} &&\in [0, \infty), \\
41+
\theta &= \arccos\left(\frac{z}{r}\right) &&\in [0, \pi], \\
42+
\phi &= \arctan\left(\frac{y}{x}\right) &&\in [0, 2\pi),
43+
\end{aligned}
44+
```
45+
where we assume the ``\arctan`` in the expression for ``\phi`` is
46+
really the two-argument form that gives the correct quadrant. The
47+
inverse transformation is given by
48+
```math
49+
\begin{aligned}
50+
x &= r \sin\theta \cos\phi, \\
51+
y &= r \sin\theta \sin\phi, \\
52+
z &= r \cos\theta.
53+
\end{aligned}
54+
```
55+
We can use this to find the components of the metric in spherical
56+
coordinates:
57+
```math
58+
g_{i'j'}
59+
= \sum_{i,j} \frac{\partial x^i}{\partial x^{i'}} \frac{\partial x^j}{\partial x^{j'}} g_{ij}
60+
= \left( \begin{array}{ccc}
61+
1 & 0 & 0 \\
62+
0 & r^2 & 0 \\
63+
0 & 0 & r^2 \sin^2\theta
64+
\end{array} \right)_{i'j'}.
65+
```
66+
The unit coordinate vectors in spherical coordinates are then
67+
```math
68+
\begin{aligned}
69+
\mathbf{𝐫} &= \sin\theta \cos\phi \mathbf{𝐱} + \sin\theta \sin\phi \mathbf{𝐲} + \cos\theta \mathbf{𝐳}, \\
70+
\boldsymbol{\theta} &= \cos\theta \cos\phi \mathbf{𝐱} + \cos\theta \sin\phi \mathbf{𝐲} - \sin\theta \mathbf{𝐳}, \\
71+
\boldsymbol{\phi} &= -\sin\phi \mathbf{𝐱} + \cos\phi \mathbf{𝐲},
72+
\end{aligned}
73+
```
74+
where, again, we omit the hats on the unit vectors to keep the
75+
notation simple.
76+
77+
One seemingly obvious — but extremely important — fact is that the
78+
unit basis frame ``(𝐱, 𝐲, 𝐳)`` can be rotated onto
79+
``(\boldsymbol{\theta}, \boldsymbol{\phi}, \mathbf{r})`` by first
80+
rotating through the "polar" angle ``\theta`` about the ``\mathbf{y}``
81+
axis, and then through the "azimuthal" angle ``\phi`` about the
82+
``\mathbf{z}`` axis. This becomes important when we consider
83+
spin-weighted functions.
84+
85+
Integration in Cartesian coordinates is, of course, trivial as
86+
```math
87+
\int f\, d^3\mathbf{r} = \int_{-\infty}^{\infty} \int_{-\infty}^{\infty} \int_{-\infty}^{\infty} f\, dx\, dy\, dz.
88+
```
89+
In spherical coordinates, the integrand involves the square-root of
90+
the determinant of the metric, so we have
91+
```math
92+
\int f\, d^3\mathbf{r} = \int_0^\infty \int_0^\pi \int_0^{2\pi} f\, r^2 \sin\theta\, dr\, d\theta\, d\phi.
93+
```
94+
If we restrict to just the unit sphere, we can simplify this to
95+
```math
96+
\int f\, d^2\Omega = \int_0^\pi \int_0^{2\pi} f\, \sin\theta\, d\theta\, d\phi.
97+
```
98+
99+
100+
## Four-dimensional space: Quaternions and rotations
101+
102+
103+
## Rotations
104+
105+
106+
## Euler angles and spherical coordinates
107+
108+

docs/src/conventions.md renamed to docs/src/conventions/outline.md

+11-30
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,3 @@
1-
Saul felt that following Wigner was a mistake, and to just bite the
2-
bullet and use the conjugate. That's reasonable; I just have to
3-
conjugate the entire representation equation to turn it into an
4-
equation for rotating spherical harmonics.
5-
6-
---
7-
81
# Outline
92

103
* Three-dimensional Euclidean space
@@ -83,7 +76,7 @@ equation for rotating spherical harmonics.
8376

8477

8578

86-
---
79+
# Notes
8780

8881
Spherical harmonics as functions on homogeneous space.
8982
https://www.youtube.com/watch?v=TnFvOa9v7do gives some nice
@@ -173,35 +166,23 @@ conjugate transpose, which is why we see the relative conjugate.
173166
\mathfrak{D}^{(\ell)}_{m,\propto s}(R_{\theta, \phi})
174167
```
175168

176-
# Conventions
177-
178-
## Quaternions
179169

170+
## collapsible markdown?
180171

181-
## Rotations
182-
183-
184-
## Euler angles and spherical coordinates
172+
```@raw html
173+
<details><summary>CLICK ME</summary>
174+
```
175+
#### yes, even hidden code blocks!
185176

186-
We start with a standard Cartesian coordinate system ``(x, y, z)``.
187-
The spherical coordinates ``(r, \theta, \phi)`` are defined by
188-
```math
189-
\begin{aligned}
190-
x &= r \sin\theta \cos\phi, \\
191-
y &= r \sin\theta \sin\phi, \\
192-
z &= r \cos\theta.
193-
\end{aligned}
177+
```julia
178+
println("hello world!")
194179
```
195-
The inverse transformation is given by
196-
```math
197-
\begin{aligned}
198-
r &= \sqrt{x^2 + y^2 + z^2}, \\
199-
\theta &= \arccos\left(\frac{z}{r}\right), \\
200-
\phi &= \arctan\left(\frac{y}{x}\right).
201-
\end{aligned}
180+
```@raw html
181+
</details>
202182
```
203183

204184

185+
# More notes
205186

206187

207188
## Spherical harmonics

0 commit comments

Comments
 (0)