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

Space In Your Place!

  • 4 Devlogs
  • 8 Total hours

A real-time N-body gravitational simulator built using Python and Pygame. This project models orbital mechanics, chaotic systems, and various gravitational phenomena using Verlet Integration for improved numerical stability. Originally created as a way to explore space physics and computational simulations, the project has evolved into an interactive educational tool capable of demonstrating a wide range of celestial dynamics :33333 he simulator uses Verlet Integration to update positions over time. Compared to simpler methods such as Euler Integration, Verlet Integration offers improved long-term stability and better energy conservation for orbital simulations.

Ship #2 ✨ Blessed

A real-time N-body gravitational simulation built using Python and Pygame. This project models planetary motion, multi-body systems, and orbital mechanics using Verlet integration for improved stability and energy behavior.
SHIP 2: Added a Main Menu GUI (Final Ship)

  • 1 devlog
  • 4h
  • 15.60x multiplier
  • 70 Stardust
Try project → See source code →
Open comments for this post

3h 41m 26s logged

DEVLOG - 4 (or 5? idk man) - Space In YOUR Place


YOOOO, So I had recently shipped this project, and I got a lot of helpful feedback! One of the most common feedback was that the program needed a better UI/UX, so I added a main menu (it looks so bad). One more feedback was that MacOS users can not use it: I can’t do anything ’bout that. Get windows lol

print("you have skill issue")

Main Menu GUI

I basically made my CLI into a GUI (The CLI is still usable, if anyone wants to use it. I like the CLI more ’cuz it gives more flexibility) I also stars in the background. They look pretty decent (They are ANIMATED!). Also, for some reason the plots BROKE, idk why so I had to fix that too.

I am gonna ship again, and finally let this project rest in peace. I am happy with how this turned out and I have wasted enough time on it (Even before stardance started FYI).
I am gonna fully focus on other projects now (CHECK OUT an EPIC Light Sail simulation NOW, its simulation I am working on for my paper)


Well, that’s it for me today, hope YOU have a wonderful time, all the time!


(Markdown so weird gng)

0
0
24
Ship #1

I have made an N-body simulation that simulates and plots the behavior of a plethora of bodies in different configurations. I am very proud of the Verlet integration configured in the program. It was very hard for me to figure that out but I had a lot of fun doing that.
The collisions and rendering were especially hard for me to integrate as it was my first time using Pygame. I had started the project some time ago (before I even knew about Stardance).

  • 3 devlogs
  • 5h
  • 10.35x multiplier
  • 47 Stardust
Try project → See source code →
Open comments for this post

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

10
4
995

Delete project?

Are you sure you want to permanently delete this project? This action cannot be undone.

All devlogs, followers, and associated data will be removed.

Followers

Loading…