How do I program a relativistic gravity simulator?
>>8824991
As in GR? Not easily.
>>8824991
[math]\frac{Gm_1m_2}{r^2} = F_g[/math]
[math]F=ma[/math]
>>8825011
Moron
You must first understand the meaning of the equations. That is the hard part. Then you must translate that into some partial differential equations, and then you can solve those with some numerical methods.
>>8825029
What are the equations.
How do I translate them.
What's the best numerical method to use.
>>8825048
Einstein Field Equations. They are a set, if I am not mistaken, of 10 coupled second order partial differential equations. There is probably a physicist here who knows more about it than I do. In your case, they would probably only be relevant if you plan on making a game with more than two bodies like pic related. If you want a specific case of a body orbiting a black hole, you would probably use a simplification in algebraic form instead of solving it in real time. Simplifying them is a difficult task on its own.
[math] R_{\mu \nu} - {1 \over 2}g_{\mu \nu}\,R + g_{\mu \nu} \Lambda = {8 \pi G \over c^4} T_{\mu \nu} [/math]
I hope the latex works.
>>8825048
Einstein equations
Find metric tensor + christoffle symbols
Use some version of fast marching. Or solve the Euler Lagrange equations at discrete points on your geodesic and use an interpolation hack.
Im assuming youre going to have 1 bigass thing so you won't need to recompute your manifold every time some little thing moves. If my assumption is false, i cant help u and u mite be fucked.
>>8825173
How do they compare to Navier-Stokes
I've been reading about numerical relativity and it seems I'm out of my league
>>8825023
I believe he was making an allusion to the highly debated belief that the universe is itself a simulation, and that these equations are how the universe has been programmed on a basic level.
Please try to understand your peers before insulting them.
>>8825173
>TIP: You can preview your latex equations by clicking the "TEX" in the top left-hand corner of the reply box.
>>8825173
Best book on solving this shit.
https://www.amazon.com/Relativity-Einstein-Equations-Mathematical-Monographs/dp/0199230722
>>8825630
doesn't always work
make sure each backslash has a space before it
>>8824991
Very carefully. Look up numerical relativity. It is very hard and computationally intensive.
http://ccrg.rit.edu/research/numerical-relativity
Even the generic 2 body problem has yet to be solved analytically