I was inspired by the fact that teachers often have difficulty with labs during the pandemic. Labs are an important part for learning science and physics, and are often what truly helps students understand and get inspired. Therefore it is vital to be able to do labs virtually.

What it does

This is a completely web-based 3D gravity / orbit simulation optimized for ease of use. The simulation allows you to place and position objects in three dimensions, and see how the interact via the gravitational force (also called an n body simulation). The website also stores simulation data in the url hash, meaning that a simulation / state can easily be saved, shared, and/or embedded by simply copying the link.

How we built it

I built this using primarily JavaScript and three.js. The website is static.

Challenges we ran into

Challenges included designing the UI since I am pretty bad at graphic design, getting 3D things to work as I am still relatively new to three.js, making sure the physics and vector math is correct, and figuring out how to store and retrieve data from the URL hash.

Accomplishments that we're proud of

I am very proud of the UI. I think this is one of the best UIs I have made to date. I am also proud that I managed to store and retrieve data from the URL hash, since that was a concept I have been wanting to try for a bit.

What we learned

I learned a lot about three.js and 3D stuff in web development. I learned how to design better UIs. I was also able to refresh some physics in the process of coding the simulation. I was even able to reinforce my knowledge of some useful things such as JSON and URL encoding.

What's next for Orbit Lab

I want this to be a dynamic website. Although the simulation is the main feature, I also want to make a forum optimized for the specific purpose of this website (e.g. with convenient ways to embed the simulations and type formulas), and a place for posting lessons. This website was deployed on firebase because I plan on using firebase to do this.

Share this project: