
Announcing a new app: Particle Planets
I’ve launched a new app called Particle Planets, a fun n-body simulation of gravitational forces between planets and stars. I wanted to create it because my Exoplanet and Solar System apps are basically on rails. The user can only view what’s already there. I thought it be interesting to let them people something unique.
Download Particle Planets from Google Play
It was certainly a design challenge. Manipulating a sandbox gravity simulator in 3D would be nearly impossible on a tablet or phone with a 2D interface. For this reason, and also to maximise performance, the app with two modes: a pseudo 3D view for watching the simulation, and a 2D mode for editing.
In edit mode, you have the option of creating objects of varying sizes, ranging from Mercury sized objects, all the up to Class O stars. Selecting a planet or star and tapping the screen places it into the sandbox. You can then drag a velocity vector to change the direction and speed that the planet is moving at.
By default stars that are added to the sim are “pinned”, meaning that they won’t move from their starting position and won’t have a velocity vector. Unpinning them makes them behave exactly the same as planets.
One feature to take note of is the “Add in orbit” toggle button. When enabled, choosing an object in the sand box and then placing a new object near it will cause the new planet or star to be given a velocity vector that will put it into a stable orbit around the initially selected object. This makes constructing a system of orbiting bodies easy.
The default gravity settings are set so that it’s possible to create moons orbiting around planets which orbit stars. This was a balancing act because I couldn’t set it up to use the real gravitational constant with real mass figures due to huge rounding errors when working with floating point numbers. The limited screen size forced me to minimise the area that the planets occupied, which meant tweaking the system so that it would produce a stable orbit that fit into a typical screen size.
While the simulation is running, if two objects collide, their masses will be combined. When a planet becomes large enough it will turn into a star. I’ve also added debris to the system so that when an object hits another, there’s a chance that it will throw off asteroids that can go into orbit or fly off into space. This can result in some cascading devastation.
I’m particularly proud of the user interface on this one. Work commenced in late December, but I had to shelve it until April.
The to-do list
Nearly everything I wanted is in the app. Two main features that I am working on are an option to allow you to submit interesting simulations to a shared online folder where other people can download them to try them out. I’m also thinking of putting in a section for unusual objects, such as a white hole, which would spit out small random objects into your 3D scene.
Download Particle Planets from Google Play
There’s still a few things that need tidying up:
- Create some more demo scenes
- Finish off the app page
- Finish the Google Play page
- Finish the FAQ
- Release it on Amazon