diff options
| Commit | d90f2b3be2e7637fa4b1dbb3fad48da3a5266c6a (patch) | |
|---|---|---|
| Author | 2025-08-20 08:02:36 +0300 | |
| Committer | 2025-08-20 08:02:36 +0300 | |
| Files | 6707b8e5fef8cfa9d2552620d70d47fa58ca2d7e /src/blog | |
| syndamia.com-d90f2b3be2e7637fa4b1dbb3fad48da3a5266c6a.tar syndamia.com-d90f2b3be2e7637fa4b1dbb3fad48da3a5266c6a.tar.gz syndamia.com-d90f2b3be2e7637fa4b1dbb3fad48da3a5266c6a.zip | ||
| Parent | 8cbdfa456cbfcadd1364580a90bd26f0dec38743 (diff) | |
feat(blog/physics-black-hole-shader): Separate LaTeX markup into files
4 files changed, 43 insertions, 40 deletions
diff --git a/src/blog/the-physics-behind-a-black-hole-shader/algorithm.tex b/src/blog/the-physics-behind-a-black-hole-shader/algorithm.tex new file mode 100644 index 0000000..3e33a11 --- /dev/null +++ b/src/blog/the-physics-behind-a-black-hole-shader/algorithm.tex @@ -0,0 +1,25 @@ +\begin{align*} + & p_{cbh} = \text{position of center of black hole}\\ + & r_s = \text{Schwarzchild distance from } p_{cbn} \\ + & r_{ps} = \frac{2}{3}r_s \quad \text{(photon sphere)}\\ + & r_{ISCO} = 3 r_s \\ + \\ + & p_l = \text{position of light "particle"}\\ + & v_l = \text{velocity of light "particle"}\\ + \\ + & r_l = \| p_l-p_{cbh} \| \quad \text{(distance between black hole and light)}\\ + & \text{If } r_l \leq r_{ISCO} : \\ + & \quad h = \| r_l \cross v_l \|\\ + & \quad \text{LightMovesLimit} = \infty \\ + & \quad \text{Repeat maximum LightMovesLimit times}:\\ + & \qquad \text{If } r_l \leq r_s : \\ + & \qquad \quad \text{return "Light never escapes"} \\ + & \qquad \text{If } r_l \leq r_{ps} : \\ + & \qquad \quad \text{LightMovesLimit} = 100 \\ + & \qquad \text{If } r_l > r_{ISCO} : \\ + & \qquad \quad \text{return "Light escaped black hole"} \\ + & \qquad p_l = p_l + v_l \quad \text{(move light)}\\ + & \qquad r_l = \| p_l-p_{cbh} \| \quad \text{(update distance to $p_{cbh}$)}\\ + & \qquad v_l = v_l + \overrightarrow{F}(r_l,h) \quad \text{(update light velocity)} \\ + & \quad \text{return "Light stuck in photon sphere, never escapes"} +\end{align*} diff --git a/src/blog/the-physics-behind-a-black-hole-shader/antonelli_formula.tex b/src/blog/the-physics-behind-a-black-hole-shader/antonelli_formula.tex new file mode 100644 index 0000000..4d24e9a --- /dev/null +++ b/src/blog/the-physics-behind-a-black-hole-shader/antonelli_formula.tex @@ -0,0 +1,8 @@ +\begin{align*} + & \overrightarrow{F}(r_l,h) = -\frac{3}{2} \; h^2 \; \frac{\hat{r_l}}{\|r_l\|^5} \quad \text{, where}\\ + & h = \|r_l \cross v_l\|\\ + & \hat{r_l} = \frac{r_l}{\|r_l\|}\\ + & \|x\| = \text{magnitude of }x\\ + & r_l = \text{vector from black hole center to light "particle"}\\ + & v_l = \text{velocity of light "particle"} +\end{align*} diff --git a/src/blog/the-physics-behind-a-black-hole-shader/antonelli_formula_simplified.tex b/src/blog/the-physics-behind-a-black-hole-shader/antonelli_formula_simplified.tex new file mode 100644 index 0000000..4abc30e --- /dev/null +++ b/src/blog/the-physics-behind-a-black-hole-shader/antonelli_formula_simplified.tex @@ -0,0 +1,7 @@ +\begin{align*} + & \overrightarrow{F}(r_l,h) = -\frac{3}{2} \; h^2 \; \frac{r_l}{\|r_l\|^6} \quad \text{, where}\\ + & h = \|r_l \cross v_l\| \text{ (calculated right before being affected by black hole)}\\ + & \|x\| = \text{magnitude of }x\\ + & r_l = \text{vector from black hole center to light "particle"}\\ + & v_l = \text{velocity of light "particle"} +\end{align*} diff --git a/src/blog/the-physics-behind-a-black-hole-shader/index.du b/src/blog/the-physics-behind-a-black-hole-shader/index.du index cd9f779..739e546 100644 --- a/src/blog/the-physics-behind-a-black-hole-shader/index.du +++ b/src/blog/the-physics-behind-a-black-hole-shader/index.du @@ -388,51 +388,14 @@ The images for my custom LaTeX equations were created on [url https://latexedito #### Antonelli's formula - explained ```latex -\begin{align*} - & \overrightarrow{F}(r_l,h) = -\frac{3}{2} \; h^2 \; \frac{\hat{r_l}}{\|r_l\|^5} \quad \text{, where}\\ - & h = \|r_l \cross v_l\|\\ - & \hat{r_l} = \frac{r_l}{\|r_l\|}\\ - & \|x\| = \text{magnitude of }x\\ - & r_l = \text{vector from black hole center to light "particle"}\\ - & v_l = \text{velocity of light "particle"} -\end{align*} +'include ./antonelli_formula.tex #### Antonelli's formula - simplified ```latex -\begin{align*} - & \overrightarrow{F}(r_l,h) = -\frac{3}{2} \; h^2 \; \frac{r_l}{\|r_l\|^6} \quad \text{, where}\\ - & h = \|r_l \cross v_l\| \text{ (calculated right before being affected by black hole)}\\ - & \|x\| = \text{magnitude of }x\\ - & r_l = \text{vector from black hole center to light "particle"}\\ - & v_l = \text{velocity of light "particle"} -\end{align*} +'include ./antonelli_formula_simplified.tex #### Algorithm ```latex -\begin{align*} - & p_{cbh} = \text{position of center of black hole}\\ - & r_s = \text{Schwarzchild distance from } p_{cbn} \\ - & r_{ps} = \frac{2}{3}r_s \quad \text{(photon sphere)}\\ - & r_{ISCO} = 3 r_s \\ - \\ - & p_l = \text{position of light "particle"}\\ - & v_l = \text{velocity of light "particle"}\\ - \\ - & r_l = \| p_l-p_{cbh} \| \quad \text{(distance between black hole and light)}\\ - & \text{If } r_l \leq r_{ISCO} : \\ - & \quad h = \| r_l \cross v_l \|\\ - & \quad \text{LightMovesLimit} = \infty \\ - & \quad \text{Repeat maximum LightMovesLimit times}:\\ - & \qquad \text{If } r_l \leq r_s : \\ - & \qquad \quad \text{return "Light never escapes"} \\ - & \qquad \text{If } r_l \leq r_{ps} : \\ - & \qquad \quad \text{LightMovesLimit} = 100 \\ - & \qquad \text{If } r_l > r_{ISCO} : \\ - & \qquad \quad \text{return "Light escaped black hole"} \\ - & \qquad p_l = p_l + v_l \quad \text{(move light)}\\ - & \qquad r_l = \| p_l-p_{cbh} \| \quad \text{(update distance to $p_{cbh}$)}\\ - & \qquad v_l = v_l + \overrightarrow{F}(r_l,h) \quad \text{(update light velocity)} \\ - & \quad \text{return "Light stuck in photon sphere, never escapes"} -\end{align*} +'include ./algorithm.tex |