A Solar System on your table

Bringing the art of the Orrery to Augmented Reality.

John Kennedy
6 min readJan 25, 2018
An Orrery, projected onto my dining room table using Augmented Reality in Pocket Universe.

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.

Kepler’s second law — planets don’t move in neat circles.

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).

Kerbal Space Program: an engrossing simulation game that will help you appreciate the challenges of space travel.

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 Antikythera mechanism, an ancient planetarium. Image from Wikipedia.

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.

An example of an Orrery, named after the 4th Earl of Orrery. Image from Wikipedia.

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!”).

A mechanical planetarium made by Benjamin Martin in London in 1766, used by John Winthrop to teach astronomy at Harvard, on display at the Putnam Gallery in the Harvard Science Center. Image from Wikipedia.

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.

A Planetica: a modern take on the Orrery, good until 2046. Considerably more affordable that the 16th and 17th century examples pictured on this page, but somehow less attractive, even with the LED.

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.

Pocket Universe has been around for a long time, this version ran on Windows CE. Slowly.

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 typical headset that holds your phone: because standing outside looking at the sky isn’t enough any more.

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.

Another example of Augmented Reality. Less educational? Who can say. Image from GOINTENDO.

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.

Planets floating in my living room. No pharmaceutical assistance required.

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 desktop Orrery, an augmented reality model generated by the iPhone app Pocket Universe.

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

--

--

John Kennedy

I like writing games and science apps. I work at Microsoft helping developers, and my vehicles are all electric.