Inspiration

We aimed to think big, avoiding the easy route to challenge ourselves and see what we could achieve. This drive led us to bring an idea we brainstormed in a local McDonald's to life, and actually make it work in time.

What it does

Our platform visualizes gravitational interactions between celestial bodies. It lets users place planets on a canvas to observe their interactions, while also allowing them to incorporate real-world planetary positions. Users can add other objects, such as random planets or rockets, to see how they interact with the planets in the simulation.

How we built it

Our code is divided into four main parts:

1) instantpos.py : This module retrieves planetary positions using NASA's Horizons API, projects them onto a 2D heliocentric plane, and calculates instantaneous velocities. These values are then passed to the main Pygame module. 2) Simulation.py : Users can place planets, add them to a list, and simulate their motion from initial conditions. Scenes can be saved in JSON format for later reloading. This module also incorporates real-world planetary positions, enabling users to drop additional planets or rockets into the scene to see how they interact. 3) main.py We created an interactive HUD with a main menu screen featuring Start, Sound, and Exit buttons. Start begins the simulation, Sound allows volume adjustment, and Exit closes the application. 4) zoomfunction.py: We Create a slider for the user to zoom in and out in the space to have a better view and notice the close movements in the space.

Challenges we ran into

Initially, we attempted to fetch real-time planetary positions for every frame, but the API’s response time limited us to 0.3 fps. Also the Wifi was down making it harder to upload data We overcame this by building our own physics engine, which significantly boosted performance and team morale.

Accomplishments that we're proud of

This was the first hackathon for all four of us. We’re proud of our perseverance in overcoming initial doubts and the time and effort we invested in our code, which ultimately produced results we’re thrilled with.

What we learned

This project taught us to work effectively with multiple modules and highlighted the benefits of teamwork.

What's next for Space Explorers

We will continue to work on our skills and use the experience this Hackathon gave us to come out even stronger next time.

Built With

Share this project:

Updates