Skip to content

Add N-body gravity simulator series (Python, Programming for Lovers) - #961

Open
phcompeau wants to merge 1 commit into
practical-tutorials:masterfrom
phcompeau:add-p4l-gravity-simulator-python
Open

phcompeau wants to merge 1 commit into
practical-tutorials:masterfrom
phcompeau:add-p4l-gravity-simulator-python

Conversation

@phcompeau

Copy link
Copy Markdown

What is this?

A two-part Python code-along from Programming for Lovers. Part 1 introduces classes and dataclasses. Part 2 builds a gravity physics engine from Newton's laws (net force, velocity, and position updates), reads initial systems from file, and runs the finished program from the command line to render videos of Jupiter's moons and several periodic three-body orbits. Each part has a video and full code, and the starter code (file I/O and drawing helpers plus data files) is a free download.

Checklist

  • This PR adds/fixes exactly one tutorial (or is a docs/tooling-only change).
  • Free and open -- no paywall, login wall, or required newsletter signup.
  • Project-based -- following it, the reader builds a complete, working artifact.
  • I searched README.md for this URL and title -- it is not already listed.
  • Entry uses - [Title](https://...) format, placed under the correct section (nested - [Part N](...) for multi-part series).
  • No URL shorteners.
  • I ran python3 scripts/check_readme.py lint locally and it exits 0.
  • Relationship disclosure: I am the author. I (Phillip Compeau) wrote Programming for Lovers.

Lint exits 0, and check-links on the two added URLs returns 200 for each.

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant