Summary Files Commits Branches @commit @diff @stats
path: root / src / blog
diff options
context:
space:
mode:
Commitfa583c163561fb88240c2a3cddcfb7241e869a72 (patch)
Author
 Syndamia <kamen@syndamia.com>
2024-10-06 10:53:48 +0300
Committer
 Syndamia <kamen@syndamia.com>
2024-10-06 10:53:48 +0300
Filese0564f393d7644332c011885526560eab7140ad2 /src/blog
syndamia.com-fa583c163561fb88240c2a3cddcfb7241e869a72.tar
syndamia.com-fa583c163561fb88240c2a3cddcfb7241e869a72.tar.gz
syndamia.com-fa583c163561fb88240c2a3cddcfb7241e869a72.zip
Parentf0891b5efc6b4fc65c64d4a84b0df08eea3bec0e (diff)
[blog/tpbhs] Fixed all TODOs
1 files changed, 22 insertions, 22 deletions
-rw-r--r--src/blog/the-physics-behind-a-black-hole-shader/index.md44
diff --git a/src/blog/the-physics-behind-a-black-hole-shader/index.md b/src/blog/the-physics-behind-a-black-hole-shader/index.md
index 2c1084f..964b65f 100644
--- a/src/blog/the-physics-behind-a-black-hole-shader/index.md
+++ b/src/blog/the-physics-behind-a-black-hole-shader/index.md
@@ -2,15 +2,16 @@
## Contents
-1. [What do the physics say?](TODO)
- 1. [What is gravity?](TODO)
- 2. [What does it mean to bend space?](TODO)
- 3. [How to solve the EFEs?](TODO)
- 4. [What is a black hole?](TODO)
-2. [Finding a formula](TODO)
-3. [Applying the formula to “bend” light’s path](TODO)
- 1. [Properties of a black hole](TODO)
-4. [Light-bending algorithm](TODO)
+1. [What do the physics say?](#what-do-the-physics-say)
+ 1. [What is gravity?](#what-is-gravity)
+ 2. [What does it mean to bend space?](#what-does-it-mean-to-bend-space)
+ 3. [How to handle the EFEs?](#how-to-handle-the-EFEs)
+ 4. [What is a black hole?](#what-is-a-black-hole)
+ 5. [What about speed and time?](#what-about-speed-and-time)
+2. [Finding a formula](#finding-a-formula)
+3. [Applying the formula to “bend” light’s path](#applying-the-formula-to-bend-lights-path)
+ 1. [Properties of a black hole](#properties-of-a-black-hole)
+4. [Light-bending algorithm](#light-bending-algorithm)
5. [Appendix](#appendix)
Back in August 2023 I had to submit a project for an elective WebGL programming course in university.
@@ -35,9 +36,11 @@ I'll assume you don't know much about physics, but are familiar with mathematics
The "big words" version of what we're going to explore is:
-Using [Einstein's field equations](TODO), we can precisely calculate the curvatures in space(time) at every point around a black hole.
-Obviously we're going to use [Schwarzschild metric](TODO) on a (Schwarzschild) black hole.
-To further simplify our calculations, we can make approximations using [celestial mechanics](TODO).
+Using [Einstein's field equations][EFE], we can precisely calculate the curvatures in space(time) at every point around a black hole.
+Obviously we're going to use [Schwarzschild metric](https://en.wikipedia.org/wiki/Schwarzschild_metric) on a (Schwarzschild) black hole.
+To further simplify our calculations, we can make approximations using [celestial mechanics](https://en.wikipedia.org/wiki/Celestial_mechanics).
+
+[EFE]: https://en.wikipedia.org/wiki/Einstein_field_equations
This is not *necessary* to understand, but it will make our goal **much** clearer.
@@ -76,7 +79,7 @@ Obviously, it's an arc of a circle and extending it to it's maximum possible len
Now, what does it mean to go "forwards"?
On a flat surface, we can define it as "following a (straight) line segment", on our sphere we can say "following an arc of a great circle".
-Better yet, in geometry there are [geodesics](TODO), the general term for a curve on any surface which is the shortest[^geodesics-are-local] path between any two points.
+Better yet, in geometry there are [geodesics](https://en.wikipedia.org/wiki/Geodesic), the general term for a curve on any surface which is the shortest[^geodesics-are-local] path between any two points.
So now we can say "going forwards means going along a geodesic".
[^geodesics-are-local]: This actually isn't completely true, a geodesic is the "locally shortest distance", I've skipped the details since they aren't really that important for our purposes. More info can be found on [Wikipedia](https://en.wikipedia.org/wiki/Geodesic#Introduction).
@@ -87,9 +90,7 @@ For example, on a flat surface, we can have parallel lines, but on our sphere, g
[^parallels-of-latitude]: You might think about the latitudinal lines on a globe, they are indeed parallel (equidistant), but if you take any two points on the same such line, the distance between them won't be the smallest.
This is what gravity does, it doesn't pull or push, it *bends*, and more precisely, it **bends geodesics**.
-Furthermore, we live in three spacial dimensions, so we can move in three *different*[^colinearity] *directions*.
-
-[^colinearity]: TODO
+Furthermore, we live in three spacial dimensions, so we can move in three *different directions*.
The resultant effect is that if you travel perfectly forwards in a spaceship and pass by an object with mass (like a planet) from a close enough distance, your path will be curved, without you steering your ship.
@@ -99,7 +100,7 @@ In effect, in a universe where there is only light bouncing around, Newton's equ
On that note, the point that light **doesn't** travel at an infinite speed is significant.
When the opposite is true, General Theory of Relativity collapses into the Newtonian equations!
-Going back on track, Einstein gives us the necessary equations for those geodesics, the [Einstein Field Equations](TODO).
+Going back on track, Einstein gives us the necessary equations for those geodesics, the [Einstein Field Equations][EFE].
### How to handle the EFEs?
@@ -110,10 +111,10 @@ To be more precise, the output isn't *really* a function, it's a "metric", which
In the 1910s Schwarzschild solved the equations for a universe where there is only one non-rotating[^schwm-assumptions] particle with mass, then in the 1960s the equations were solved when that particle could rotate, that's it.
There are plenty of other mathematical solutions, but we have been able to relate the "real" world to only those two.
-[^schwm-assumptions]: He also assumed the body didn't have an electric charge and the [cosmological constant](TODO) is zero.
+[^schwm-assumptions]: He also assumed the body didn't have an electric charge and the [cosmological constant](https://en.wikipedia.org/wiki/Cosmological_constant) is zero.
This may sound unsatisfactory, but in practice, it's quite enough.
-In the solar system, [>99.86% of mass is in the Sun](TODO), so assuming all other objects are massless, we get enough precision to explain Mercury's orbit.
+In the solar system, [>99.86% of mass is in the Sun](https://en.wikipedia.org/wiki/Solar_System), so assuming all other objects are massless, we get enough precision to explain Mercury's orbit.
We can apply the same idea to our simulation, leaving all objects which aren't our black hole without mass.
Schwarzschild's metric and accompanying black hole properties are the simplest possible solution, so we'll use that.
@@ -133,7 +134,7 @@ By increasing the force with which you push on them, after a certain threshold,
Those shards will still have some fight in them, so after increasing your force by another level, you'll turn all of those shards into tiny glass granules.
A similar occurrence happens with atoms.
-Normally atoms are spread apart, by pushing them together, at a certain point (ignoring the orbiting electrons) all nuclei will be "touching" and the [nuclear force](TODO) will keep them together.
+Normally atoms are spread apart, by pushing them together, at a certain point (ignoring the orbiting electrons) all nuclei will be "touching" and the [nuclear force](https://en.wikipedia.org/wiki/Nuclear_force) will keep them together.
By further increasing your pushing force you can overwhelm the nuclear force and "shatter" the nuclei into their subatomic particles.
Assuming an enormous explosion doesn't happen, and you can keep increasing your force, it's also possible to overwhelm the "subatomic forces" that keep those subatomic particles "together"[^matter-together].
@@ -159,7 +160,7 @@ So much so, if you get too close, you will not be able to overwhelm gravity and
*Image by OpenStax University Physics on [Wikipedia](https://commons.wikimedia.org/w/index.php?curid=64307901)*
A fascinating realization is that light always travels along geodesics ("forwards"), therefore this extreme bending allows us to view otherwise obstructed objects.
-We call that effect [gravitational lensing](TODO).
+We call that effect [gravitational lensing](https://en.wikipedia.org/wiki/Gravitational_lens).
Though not unique to black holes, that's when the effect is strongest:
![](https://upload.wikimedia.org/wikipedia/commons/0/02/Gravitational_lens-full.jpg)
@@ -411,4 +412,3 @@ The images for my custom LaTeX equations were created on [latexeditor.lagrida.co
& \quad \text{return "Light stuck in photon sphere, never escapes"}
\end{align*}
```
-