I've started a tutorial for Newtonian gravity in PDF format. I have the math and code written, and now I'm just fleshing it out with English:
https://github.com/sjhalayka/papers/blob/main/newtonian%20gravitation/bezier_escape.pdf
In the tutorial, I am covering the following topics:
- Typedefs and constants
- Brute force: integer field line count (glacially slow)
- Heuristic: real field line count (much faster)
- Modeling Mercury's orbit
- Euler integration
- Symplectic integration
- A final code: https://github.com/sjhalayka/mercury_orbit_glut
Is there anything else that you'd like to see in the tutorial?