You are browsing as a guest. Sign up (or log in) to start making projects!

linus

@linus

Joined May 31st, 2026

  • 7Devlogs
  • 1Projects
  • 0Ships
  • 0Votes
cool Quacky
Open comments for this post
Reposted by @linus

1h 27m 5s logged

tbh the WinUI code is insanely messy and needs to be fixed, so I’ll be fixing it later. I think it would be good for me to start on the mac os side of things because it would allow me to work on less messy code. I think it would be much better to work on new code rather than fixing old code. There are still a ton of random bugs where sometimes editing will not work and some things will fail randomly.

0
1
90
Open comments for this post
Reposted by @linus

2h 18m 10s logged

SPACE IN YOUR PLACE!

After several months of development, I’ve finally published my first major physics project: A Planetary Body Simulation.

This is a real-time N-body gravitational simulator written in Python using Pygame. The goal of the project was to explore orbital mechanics, chaotic systems, and numerical simulation while building an interactive application that visualizes how celestial bodies move under gravity.

Features

Current systems included in the simulator:

-Solar System simulation
-Binary star system
-Three-body chaotic system
-Gravitational slingshot demonstration
-Lagrange point (L4 & L5) system
-Horseshoe orbit system
-(I want to add more)

Other features:

-Verlet integration (had to spen an AMOUNT of time to ad Verlet)
-Energy analysis (KE, PE, Total Energy)
-Velocity plotting
-Camera controls and zoom
-Trail rendering
-Configurable timestep

Physics Concepts

The simulator uses:

Newtonian gravity
N-body interactions
Orbital mechanics
Energy conservation
Chaotic dynamics

One of the most interesting things I discovered while building this project was how sensitive some systems are to numerical accuracy. Small changes in timestep can dramatically affect long-term stability, especially in chaotic systems.

New Feature Added Today!

Today I added 3D trajectory visualization.

Instead of only plotting motion in X-Y space, the simulator can now generate a 3D graph where:

X-axis = X Position
Y-axis = Y Position
Z-axis = Time

This allows orbital motion to be visualized as a path through time rather than just a flat orbit.

Stable systems produce smooth helical structures, while chaotic systems create much more complex patterns.

This was my first time working with Matplotlib’s 3D plotting tools, and integrating the graphing system with the existing simulation data took some experimentation.

🔧 Challenges During Development

Some problems I had to solve while building the simulator:

-Numerical instability
-Energy conservation issues
-Chaotic three-body behavior
-Restart system bugs
-Data collection for plotting

A lot of development time was spent debugging rather than adding features, but that ended up teaching me much more about simulation and computational physics.

What’s Next?

Potential future improvements:

-True 3D simulation (maybe)
-Adaptive timestep system
-Better visualization tools
-Collision handling
-More orbital systems

9
4
888

Followers

Loading…