A Solar System on your table
Bringing the art of the Orrery to Augmented Reality.
At the risk of sounding like the introduction to an over-dramatic Planetarium show, human beings have always been fascinated with the movements of the Sun, Moon and planets. Quite a few of these humans have also tried to capture these movements in machines. Along with the hubris of knowing the mind of god, a mechanical simulation could also be useful for predicting eclipses and, well, it would be just so cool.
But it isn’t easy. Despite what you might think from smooth NASA animations, the orbits of the Moon and planets are far from easy to calculate: consider that each body in the Solar System exerts a gravitational pull on every other body, and this makes for some very long-winded algorithms. In the vast theatre that is the night sky, complexity lurks around every space-time corner. Planetary orbits are not perfect circles (they’re all ellipses), and as Kepler surmised, each body’s velocity changes depending where on this orbit they happen to be.
When I first started writing code that implemented the math to find the position of the Moon, I was dismayed that so much depended on models that approximated so many different things (for example, the effect Jupiter has on the lunar orbit). I wondered how the Apollo astronauts had been able to land on the Moon with such accuracy, before remembering that as they got closer to the Moon it became quite obvious just by looking out a window where the Moon was, where they were, and what adjustments they would need to make to land on it. (If you want to try astro-navigation for yourself, I thoroughly recommend playing Kerbal Space Program).
So how did engineers and craftspeople manage to create models of the solar system using only gears, levers and little painted balls? The answer is, as you might expect, by being very clever.
One of the earliest examples of an Orrery — or Planetaria, to use the more general but appropriated term — is the Antikythera mechanism, discovered in 1900 off a Greek island and dated to between 150 and 100 BC. With a level of technical sophistication a generations ahead of its time and subsequently lost, it models the relative movements of the major bodies of the solar system well enough to predict eclipses.
The first modern device could be said to have been built by English clock-makers George Graham and Thomas Tompion in 1704. A copy was made, and presented to their sponsor Charles Boyle, the 4th Earl of Orrery, and that is where the modern name, an Orrery, comes from. The mechanical movements were physical manifestations of algorithms created thanks to math and painstaking observations.
Some of the more advanced models even include the moons around Mars, Jupiter and Saturn, and you can imagine how useful they would have been as teaching tools, or as impressive to have on your coffee table when the neighbouring Earl came over to visit. (“Yes, I know you have the Sandwich, but I have a Solar System!”).
I’ve wanted to own an Orrery for as long as I’ve known of their existence, but the nearest I could get was a plastic bowl-like device called the Planetica, which I found in the gift shop of the Armagh Planetarium. It doesn’t really have quite the same style as the intricate devices made by 16th century clock makers, although it does have a red LED that lights up when you press a button.
It’s 2018: you can have anything.
We live in age where digital technology has made everything possible — at least to a certain degree. From holographic telepresence to 3D printers, depending on your definition of “have”, you can “have” anything. So if you can’t have an actual Orrery, why not just using Augmented Reality to create one?
I’ve been working on astronomy software for mobile devices for more than 20 years, alternating beween a hobby, and a full-time job. I first wrote Pocket Universe for handheld PCs in the late 1990's, although it was the iPhone which let me get a little closer to the version that I’ve always wanted to create.
I’ve been quick to take advantage of new technologies as they became available: for example, Pocket Universe was the first ever astronomy application on a phone to use built-in magnometers and accelerometers to adjust the display depending on which direction and angle you were facing: making it so much easier put a name to stars than those plastic Planisphere disks I grew up with as tried to learn constellation names. In 2018, this is no longer a unique feature as a browse through any app store will attest, but at the time, it was quite impressive and the app was included as a demo on every iPhone in every Apple Store.
Recently I’ve been adding a few more Augmented Reality features to the app. If you own one of those VR headsets that you can pop a phone into to look at stereographic images, take it outside at night, and Pocket Universe can overlay labels over the actual stellar objects you’re looking at.
A little more ambitiously, I’ve been trying to bring the Solar System a little closer to home. Apple introduced the ARKit framework in iOS 11 which does the heavy lifting of “understanding” where in 3D space a device is located using sensors and cameras, and this makes it possible to draw 3D models in a way in which they appear fixed in space — using the iPhone or iPad as a window onto this virtual world.
The astronomy code I’ve used for years calculates the positions of the planets in space, so my first experiments coupled this with ARKit to draw planets floating around in your living room. This provides rather a good sense of scale (“Space is big, Really big.”) although it does introduce the risk of you tripping over the cat.
And now, finally, I can make my cherished Orrery. Here is my first attempt at an Orrery that displays the relative position of the Moon and planets that can (virtually) sit on your desktop.
Using it is quite straightforward: Once you have launched this view from within the app, you move your phone around, looking at your room from different angles, and within a few seconds it finds some suitable flat surfaces and overlays some targets. Tap a target, and the Orrery is drawn and pinned to that spot. You can then walk around it to see it from any side, or get up close and start animating it, watching the planets spin around the Sun, and the Moon around the Earth.
The app is in the App Store right now, so if you have an iPhone 6S or later, you can try it out for yourself. Yes, the 3D model is a little clunky at the moment, but now that the principle is proven I can start spending a little more time improving its appearance.
It’s only taken me a few decades to get my own Orrery, and now you can have one too.
Resources
- Pocket Universe, an app for iOS devices.
- Wikipedia’s page on the Orrery
- Apple ARKit by Example — Use ARKit in your own iOS applications.
- Kerbal Space Program
- Armagh Planetarium