The Trojan Math Challenge

Let’s do some astronomy for a change. You may remember my older post on places in the Solar System where cool Sci-Fi could happen. You may also remember that I did a 3D map of the interstellar neighborhood some time ago. I’m playing with the idea of making another one of those. This time I would like to make a map of the asteroid belt because it is one of the places where cool Sci-Fi could happen. But mapping the entire asteroid belt is difficult. Asteroids fly around all over the place in different orbits. The map would be just a noisy swarm of moving dots.

However there is a group of asteroids that might lend itself well to mapping them properly. They are called the Jupiter Trojans. They are special because the are gravitationally bound to the planet Jupiter. They are in fact in the very same orbit as Jupiter but they follow/trail the planet at the so-called Lagrangian Points. It’s a bit difficult to explain, so I let the pro do it for me.

So the Trojans all clump around the Lagrangian Points which means that they should fly less around the place than the other asteroids. The are also closer together in general so flying from one to another should be easier rationalize in a Sci-Fi scenario. Looking from the top, it should looks somewhat like this (source: Wikipedia).


I would like to create a map like this but in 3D and animated in order to understand that environment better. But here lies the problem. It’s not that there is a list of spatial coordinates for them. They are moving objects after all. And the orbits of those Asteroids often turn out to be… daunting. I am looking for a way to calculate this kind of data into Cartesian coordinates. Some of that stuff are orbital elements. And that’s already bad enough. Spatial trigonometry REALLY makes my brain go ka-splotch.

So here is a humble request to all math geniuses and astronomy brainiacs who read this. Can you share with me the formula to crunch this data into a cloud of points? I would be most grateful and credit you properly.

Krystian Majewski

Krystian Majewski was born in Warsaw and studied design at Köln International School of Design. Before, he was working on a mid-size console project for NEON Studios in Frankfurt. He helped establish a Master course in Game Design and Research at the Cologne Game Lab. Today he teaches Game Design at various institutions and develops independent games.

3 responses to “The Trojan Math Challenge”

  1. sirleto

    oooh yes, this is a great location – the trojans and the greeks…

    would be great to use them as a game setting *zwinker, zwinker*

  2. sirleto

    okay, i want to help you :-)
    but math is not my strength, either – but finding working/reusable content or sourcecode somewhere in the world is one of my proven powers =)

    you linked to the elements page of the JPL small-body database… are you aware that there is also a interactive java applet?

    i.e. for Hektor 624;orb=1;cov=0;log=0;cad=0#orb

    this is actually a quite old java program from

    besides being a japanese site, google is your friend and tells you that the whole source code of the app can be downloaded under this license:

    finally, you will find the java source here:

    as far as i had time to look into the code right now, i could not find a simply function – but i bet the code is in or
    hopefully in an easy resuable cartesian way – but probably atleast as a rotation matrix…

    good luck – and tell me if you’re stuck with this…

  3. Krystian Majewski

    Oh yeah, I forgot. You did some work on satellites after all. That’s awesome! Thank you! I also got some feedback on a forum as well. I should be able to figure it out. Will try to write the function this weekend. I will post the results.


The Game Design Scrapbook is a second blog of group of three game designers from Germany. On our first blog, Game Design Reviews we describe some games we played and point out various interesting details. Unfortunately, we found out that we also need some place to collect quick and dirty ideas that pop into our minds. Hence, welcome to Game Design Scrapbook. You will encounter wild, random rantings. Many of then incoherent. Some of them maybe even in German. If you don't like it, you might enjoy Game Design Reviews more.


follow Krystian on Twitter
follow Yu-Chung on Twitter
follow Daniel on Twitter