About Physital

What is Physital? Physital is an orbital physics engine - its name is a portmanteau of the words "Physics" and "Orbital". I'm an avid spaceflight fan, and so I wasn't too surprised when I had a sudden urge one day to write an orbital simulator - what did surprise me was the fashion in which I coded it. Looking for only a simple approximation of true orbits, I originally considered writing an "on-rails" engine, but it turned out to be simpler just to write a full physics engine.

What's "on-rails", and how is your version different? "On-rails" describes an engine in which all bodies follow Keplerian orbits - that is, their orbits are ellipses, parabolas, or hyperbolas - and they never leave these paths. Although easier to calculate, such models generally only hold true for two-body systems; once a third body enters the system, the models slowly grow further and further from reality. A physical engine like Physital allows calculation of 3+ body systems because instead of having an equation for the motion of each body, it calculates the net force of gravity on each body, then moves each body according to that force for a particular timestep, anywhere from a few nanoseconds to a few days, depending on how accurate/quick a simulation is required.

What language is Physital written in? Originally, Physital was written in Java, and required the user to download a program (which is still available with source code here) and run it in a JVM on their computer.

This made it easier for me, since Java was really the only language I knew fluently at the time, but since it required users to download and run software, it wasn't very accessible. To fix this, I recently created the browser-based version, which was written almost entirely in JavaScript, with tiny amounts of PHP, HTML, and CSS thrown in to make it work.

What updates are planned for Physital? Eventually, I would like to add a number of features to the web version. First, the ability for users to change the area they're viewing and the speed of the simulation (including starting and stopping). Right now the simulation is capped at a screen that fits the orbit of Jupiter and a speed of four simulation Earth days per real-time second, which significantly limits usability. The ability to focus or zoom in on a planet, and maybe slow things down to real time (or up to years per second), would really let people explore.

Next would be the ability for users to add or remove bodies in the system: if you want to add Pluto or Eris or the ISS or Voyager 2, go right ahead. After that, the only real feature I can think of is a set of data about various simulation variables - the distance between bodies (in meters or lightseconds), information about their masses and speeds, and perhaps even metrics about transfer manuevers from one body to another. There might be more after that, but that's all I've got planned so far.