Tuesday, September 2, 2014

On My 13 Favourite Pieces of Metal Music

The music I listen to falls mainly into the genres of metal and classical music. A while ago, I put together a list of my 13 favourite pieces of classical music, so I decided it was about time to put together a list of my favourite metal music. Funnily enough, I find that classical music gets me worked up, and if I want to relax, no other music works quite as well as metal. I'm not very good at having favourites, so I should probably point out that there may be some more deserving songs out there that were accidentally overlooked, and my favourites change from day to day. However, these are the ones that I'd have to consistently include near the top of a list like this, but they are in no particular order. Once again, I have limited myself to one song per artist, and I have not listed songs that have made lists on this blog before.

    1. Moonsorrow - Raunioilla

Moonsorrow is my all-purpose music. No matter what mood I'm in, I'm in the mood for Moonsorrow. It's my first choice when I have to concentrate on work, or when I want to sit back and relax, or when I'm stressed, or sad, or really happy.

    2. Rhapsody of Fire - Queen of the Dark Horizons

Rhapsody of Fire's album Rain of a Thousand Flames is considered a filler album, as it only plays a small side role in the epic story they tell through their music. Still, it contains some of their best work, and Queen of the Dark Horizons is easily my favourite song of theirs. It is a perfect mix of symphonic and power metal, and I love every second of its 13 and a half minutes.

    3. Cradle of Filth - Nymphetamine (Fix)

My brother went through a phase where he listened to nothing but Cradle of Filth. Musically, I think they are brilliant, but I never liked Dani Filth's screaming. With exposure though, I did grow accustomed to it eventually. The one song that stood out was Nymphetamine (perhaps because Liv Kristine sings a large portion of the song), from the album of the same name. The song appears twice on the album, but the first version (the overdose) has a mismatched intro and outro which just don't fit in with the rest of the song. For that reason, I prefer just the fix.

    4. Deathstars - Razor End

While I had heard a little of the Deathstars' music before I met my girlfriend, I had never heard Razor End. We'd been dating for just a couple of weeks when she had my taste in music completely figured out. She burned me a CD, which had this song on. It's a pity it's not on any Deathstars album, because I feel it's easily their best work. Four and a half years later, it was still one of the easiest songs to choose when I started putting together this list.

    5. Anathema - Eternity, Part I

I've always had a taste for depressing doom metal, and that's what led me to Anathema. I enjoy almost all of Anathema's music, from their work in the early 90's, up to their latest albums. Listening to all of their albums in order and hearing the progression in style from doom metal to through to alternative rock is a fascinating experience in itself. Eternity, Part I is the first of three parts, and is written in a rather heavy doom metal style. The second part is a soft instrumental piece, and the third part closes off the first with a more progressive style, and cleaner vocals. I encourage you to listen to all three parts, but the first is definitely my favourite.

    6. In Flames - Come Clarity

In Flames is a band I have mixed feelings about. There are many of their songs that I thoughroughly enjoy, and then there are others that I cannot stand. Come Clarity is one of their softer songs, and I'm not sure what it is about the song that makes me love it so much.

    7. Wintersun - Death and the Healing

There are a couple songs from Wintersun which were strong contenders for this list. Beautiful Death was probably at the top, but it has already been listed on this blog as part of the soundtrack for the end of the world. Instead, I chose Death and the Healing. The slower pace and clean vocals make the song really stand out from the melodic black metal that makes up the rest of the album.

    8. Metallica - No Leaf Clover

When Metallica reached 30 years old, I compiled a list of my 30 favourite Metallica songs. Of them, 27 were released in the first 15 years of their career, and only 3 in the second 15 years. Also, I really don't like live music. It's rather funny then that my absolute favourite Metallica song was only released in the band's 19th year, and only ever as a live recording. I think it has something to do with the symphonic elements. I just wish there was a studio recording of the song.

    9. Nightwish - Phantom of the Opera

For a long time, Nightwish was my favourite band. For the last few years, however, there just seems to be something missing from their music (I wonder what it could be?) Even though it's not an original song, Phantom of the Opera seems to epitomise everything I loved about the band when they were at the peak of their career.

    10. Lordi - It Snows in Hell

The piano intro to this song is really simple to pick up and play, and really catchy, and I'm constantly getting the chorus stuck in my head. There's also something about the guitar solo that makes me think of a lazy Sunday afternoon.

    11. Bathory - The Lake

Although the album Blood on Ice was written in the late 80's, it wasn't released because the band were worried that it was too different to any of their other music. At the time, Bathory was known for their fast-paced black metal. Through the first half of the 90's, they changed their style, and began to define the Viking metal genre. In 1996, the band finally decided that they were ready to releace Blood on Ice. The Lake was the first song on the album that I heard, and remains my favourite to this day.

    12. Therion - To Mega Therion

Therion is the metal band that has experimented (mostly successfully) with more styles than any other band I have heard. To Mega Therion is from their album Theli, which was the first album to drop their death metal roots entirely. To Mega Therion features a full orchestra and choir, interspersed with raspy male vocals and catchy guitar and keyboard solos.

    13. Green Carnation - Light of Day, Day of Darkness

Yes, this song (if it can be called that) is just over an hour long. When I first heard about it, I expected it to be drawn out and repetitive, but it is far from it. The style and tempo of the music varies throughout the song, so that it easily maintains my interest for the full hour. I once heard a shortened version in which the song had been cut to ten minutes, and even though the editing had been done extremely well, and the transitions fitted in perfectly, I found that the song was seriously lacking. The full hour needs to be heard in one go. In my opinion, not a single second can be cut out.

Legal notice: I obviously don't claim to own any of the songs or videos in this post. Copyrights belong to the respective publishers.

If you enjoyed this post, then don't forget to like, tweet, +1, or upvote on reddit. If you have any questions, comments or complaints, post them using the form below.
. . . . . . . . . . . . . . . . . . . . . . . .

Wednesday, July 9, 2014

On Rubik's Cube

I love Rubik's cube. It's a puzzle that many people associate with intelligence, mathematical ability, and good problem solving skills, but being able to solve it actually has nothing to do with any of those. The only things you need are basic pattern recognition and muscle memory - both of which everyone has anyway.

    1. My first cubes

My first Rubik's cube was even older than I am. My dad bought two of them (one with standard colours, and one with pictures of fruit) some time in the early 80's when they first became popular, together with a short book explaining how to solve them. I found the book in 1996, shortly after we'd moved house. I asked my dad about it, and he found the two cubes for me. Not wanting to cheat, I scrambled one and tried solving it myself. It didn't take long to figure out how to solve one side, but I quickly realised that any turn inevitably messed up four sides, got frustrated, and moved on.

I came back to them a couple years later. This time, I actually tried reading the book. The first chapter was all about the internal mechanism, and how to take the cube apart. Naturally, I stopped reading there and did exactly that. I took them both apart, and put them back together in a solved state, and began to look at how various turns affected the faces. Whenever I got stuck in a position that I couldn't solve, I would take the cube apart, and put it back together. After a while, the core of one of the cubes broke while I was taking it apart. Having made very slow progress, and having lost a cube, my 12 year old brain decided it had more interesting things to do, so I moved on.

    2. Solving the damn thing

Once again, I came back the the cube a few years later. I think I was about 17 years old this time, and far more patient. I only had the cube with the fruit stickers left, so I had to be more careful. I decided to read the book, and I approached it the same way I would approach a school text book. I took a notepad and a pencil, and began to take notes.

The book described a very simple layer-by-layer method for solving the cube. You would start by inserting the four edges on the top face, and then execute a simple algorithm until they cycled into the correct positions. Then you would insert the four corners of that face, then the four edges of the middle layer. At this point, the top two layers of the cube were solved. To finish the last layer, you had to switch some corner pieces in the bottom layer to get them in the correct position, then execute an algorithm over and over until they were oriented correctly. Then, you would execute an algorithm to cycle the last four edges, until they were in the correct position, and finally you would execute one of three algorithms to flip them into the correct orientation. The book claimed that the method required an average of about 120 moves to solve the cube. There were a total of nine algorithms to learn, and it only took a couple of days to memorise them all (it's surprisingly easy if you just let muscle memory take over).

The catch was the centres. The book assumed that the cube had stickers with a solid colour, but my cube had little pictures of fruits. All of them would point the same direction except for the centres. I later learned that a cube like this is called a supercube, and some people draw arrows (or buy stickers with arrows) to turn their Rubik's cubes into supercubes. I was not content having my centres pointing the wrong way, so I sat down and figured out a couple of algorithms myself that would allow me to orient five of the six centres while solving the cube. I noticed that a couple of the algorithms I already knew rotated one or two centres if I repeated them three times, and with that, I could solve the cube, centres included.

Solving a Rubik's cube is a very relaxing task. It takes very little brain power, and is actually very meditative. Apart from occasionally glancing down to see which algorithm you need to execute next, you don't even really have to watch what you're doing. I used to solve my cube several times a week, just to meditate and relax.

    3. Moving on: new Cubes and new methods

My fruit cube lasted a surprisingly long time. After several years, it began to lock up occasionally. A couple years after that, pieces began to pop out every now and then. By late 2012, the pieces became so loose that it reached a stage where it would lock up on almost every turn, and it became almost impossible to solve without the whole thing exploding in my hands. I needed a new cube, so I bought one: a cheap Chinese cube from a flea market stall. The stickers lasted less than two weeks, and it was less than a month before one of the edges broke in half.

It was then that I decided to take things seriously. I went online and did some research, and discovered the fascinating world of speedcubing. I discovered that the world record at the time was less than six seconds, and that more than a thousand people around the world can solve a Rubik's cube in under fifteen seconds almost all the time! It put my two and a half minutes to shame.

I found out what makes of cube were actually considered good quality, and found a stickerless DaYan GuHong on sale. While waiting for my new cube to arrive (it took two months, thanks to a useless Postal service), I found a Rubik's 2x2 cube in a local toy store. I could solve it by adapting the 3x3 method, but it felt very slow and inefficient. I learnt to solve it using the Ortega method, which is a much faster method specially developed for 2x2 cubes, which is also fairly light on algorithms (you actually only need two of them, but learning up to eleven makes things faster).

Conveniently, my GuHong arrived the day before I left for America to present a paper a conference. A 15 hour plane flight is absolutely perfect for learning a new method. I made a short cheat sheet with the algorithms for the ZZ method, and between the two plane flights, I managed to memorize them.

    4. Speedcubing: attempt #1

Last month, a toy store near my girlfriend's house held a Rubik's cube competition. When I had first looked in 2013, there were only six South Africans ranked by the World cube Association, and speedcubing in the country seemed pretty much non-existent. I was fairly surprised to see an actual competition. I checked the World Cube Association website, only to see that the first official competition had been held a few months before, and more than thirty people had attended, two of whom had managed to set times under fifteen seconds.

It led me to find speedcubes.co.za, a South African online store that stocks a range of the world's leading speed cube brands. I told myself that if I could solve my cube ten times with an average time less than 90 seconds (a minute faster than a year before), then I would allow myself to buy a new cube. I made it, but only just. In ten solves, my best time was 1:22, with an average of 1:29.8.

I ordered my new cube, a DaYan ZhanChi (since my stickerless GuHong is technically not competition legal), as well as a new 2x2 (my Rubik's brand one had a cracked core), and a 4x4 cube. With these new cubes, together with a couple of key rings, I can officially say that I have begun a bit of a collection.

I thoroughly enjoyed my first competition. By some miracle, I actually won the 2x2 category with an average of just over 16 seconds (my five solves took 13, 15, 15, 18 and 32 seconds). In the 3x3 category, I came nowhere near the winning average of 45 seconds. My best time was 53 seconds, and I averaged just over a minute.

    5. Next goal: An official WCA ranking

There's going to be an official WCA ranking event in Johannesburg on 23 November, and one in Cape Town on 30 November. This leaves me four and a half months to practice and get my times down. My goal is to set at least one time less than 30 seconds at that event. I'm improving fairly quickly. As of 30 June, my average time over 100 timed solves was 1:15.62. By 8 July, my average time over 100 solves had dropped to 57.93 seconds, and my current personal best is 42.65 seconds. 30 seconds may seem ambitious, but I'm fairly confident that I will be able to do it.

If you enjoyed this post, then don't forget to like, tweet, +1, or upvote on reddit. If you have any questions, comments or complaints, post them using the form below.
. . . . . . . . . . . . . . . . . . . . . . . .

Thursday, May 1, 2014

On The Fuel-Optimal Ascent Speed in Kerbal Space Program

Kerbal Space Program is a sandbox-style spaceflight simulator game developed by Squad. The player designs and assembles spacecraft by piecing together a wide range of components, and then launches and flies them. The game places an emphasis on the realistic modelling of various physics, including structural failure of components, aerodynamic lift and drag, and accurate orbital mechanics. It should come as no surprise to learn that I absolutely love this game.

It is widely known and claimed that the most fuel efficient ascent speed for a spacecraft in Kerbal Space Program is the terminal velocity. However, not many people can actually explain exactly why this is. The whole thing has given rise to a number of misconceptions about terminal velocities and aerodynamic drag, so I felt I had to clear these up.

I'll also go through the math to calculate the actual fuel optimal ascent speed (which just happens to be equal in magnitude, but opposite in direction to the terminal velocity), because I couldn't find it explained anywhere else. I didn't really believe the claims until I did the math myself, so hopefully this will help those who are not convinced by all the half-baked whishy-washy arguments out there.

    1. What is the terminal velocity?

Many people seem to think that the terminal velocity is the maximum speed a rocket can reach. I don't know where this comes from, but it's absolutely false. The terminal velocity of an object is the speed at which an object will fall through air in the absence of all forces other than gravity and air resistance. That is, the only forces acting on the object are gravity and air resistance, or aerodynamic drag. Finding the terminal velocity is as simple as equating the weight of the object (a constant) to the drag (which varies with the square of the speed), and solving for speed. If an object is falling faster than the terminal velocity, air resistance will cause it to slow down. If it's falling slower than the terminal velocity, gravity will speed it up.

To get an object to fall faster than the terminal velocity, one simply needs needs to apply a downward force in addition to gravity.

Another thing to note is that the terminal velocity is always directed down. That's because at the terminal velocity, gravity and drag are equal in magnitude, but directly opposed.

    2. What does this have to do with going up?

The terminal velocity applies only to falling objects in the absence of other forces, so what is the relevance of the terminal velocity when your rocket is going up? The answer is, not much. It's just a useful reference point. Below the terminal velocity, your engines are doing more work to overcome gravity than drag. Above the terminal velocity, your engines are doing more work against drag than gravity. At the terminal velocity, exactly 50% of the work your engines do goes to overcoming gravity, and exactly 50% goes to overcoming drag. There's no reason why you can't just apply more thrust to ascend faster, or less thrust to ascend slower.

    3. Calculating the terminal velocity

From here on out, we're doing math. Hopefully this doesn't scare you off. As we've already pointed out, the terminal velocity occurs when the weight of the object acting downwards exactly balances the drag acting upwards. The weight is given by

where is the object's mass, and is the gravitational acceleration (which we can assume is constant if we're considering only very small changes in altitude).

The drag depends on several factors: the air density, , the cross-sectional area of our rocket, , the drag coefficient, , and the square of the object's velocity, . The equation is

The terminal velocity occurs when these two forces are equal. That is, when

To find the terminal velocity, we simply solve for to get

    4. Calculating the optimal ascent speed

We're now going to calculate the optimal ascent speed. As far as we're aware (at this stage), that has nothing to do with the terminal velocity, so we're going to start from scratch.

To do this, we're going to try find the mass of fuel that needs to be burnt to increase altitude by a small amount, and then use some basic calculus to find the speed that minimizes that. First, we'll need an expression for the change in altitude at a given speed. That's easy to do if we assume that the speed is constant. This is approximately true, provided we're considering a very small change in altitude:

where is the speed, and is the time taken to change the altitude.

We don't actually know what this change in time is, so we'd like to find another expression for it, preferably one that doesn't involve speed. To do that, we're going to make use of the rocket's impulse:

If we assume that we're looking at a very short period of time, so that the thrust is approximately constant, then this simplifies to

Now we need to calculate this impulse. Fortunately, the impulse, as you might guess, is very closely related to the specific impulse, which is a property of the engine, and is readily available for various engines in KSP. The specific impulse is defined as the impulse delivered per unit weight (at standard gravity, , which is the gravity at sea level on Kerbin) of propellant burned. Therefore, we can calculate the impulse from the weight of fuel burned, and the specific impulse of the engine:

Substituting this into our expression for impulse above, and solving for the time, we get

And so our expression for the change in altitude at a given speed becomes

So, solving for the amount of fuel burned, we get an expression for the fuel required to increase altitude by a certain amount at any given speed:

We don't know how much thrust we need to produce to maintain the optimum velocity. However, we can calculate what this value needs to be based on the two assumptions we've already made. We've assumed that the thrust is constant, and we've assumed that the velocity is constant. This means that thrust will be exactly balanced by the sum of the rocket's weight, and drag, . Therefore, we can write the thrust as

Since we're considering a very short period of time, we can assume that the weight of the rocket is constant. We've already got expressions for weight and drag, but we'll repeat them here. They are


We can substitute these into our equation for thrust to get

Then we can substitute that into our expression for fuel required to get

This can be simplified to give a simple expression for the fuel required to increase altitude by a small amount at any given speed.

We want to find the speed that minimizes the fuel required. This is a standard optimisation problem, and means we need to set the derivative of the objective function to zero.

That derivative is fairly easy to get with basic calculus. It leaves us with the following equation to solve:

This is easy to solve. Move the first term across to the other side, cancel and on each side and then multiply through by . This leaves the following expression:

Does that look familiar? It should. This is the exact same equation we had to solve to calculate the terminal velocity. The term on the left is simply the weight, and the term on the right is the drag. This means that the speed that minimises the fuel required to increase in altitude just happens to be the speed at which weight and drag are equal.

This means that the velocity that gives a fuel optimal ascent is equal in magnitude to the terminal velocity, but in the opposite direction.

If you enjoyed this post, then don't forget to like, tweet, +1, or upvote on reddit. If you have any questions, comments or complaints, post them using the form below.
. . . . . . . . . . . . . . . . . . . . . . . .

Friday, March 14, 2014

On QuickCoords - A tool for quickly capturing coordinates across a series of images.

I needed an easy way to manually track the positions of features across a series of more than 600 photographs. Loading each individual photo and copying the coordinates of each point one at a time gets very tedious very fast, and none of the programs that I tried really seemed to support a rapid workflow.

That's why I wrote my own. QuickCoords v0.1beta is now available, either from Sylvermyst Technologies or from GitHub.

It's still in beta, so if you have any need for a program like this, try it out. The following features are fully functional:
  • Select a folder, and load images from that folder.
  • Quickly switch between images using a range of keyboard shortcuts.
  • Click anywhere in the image to get the coordinates of that point with sub-pixel accuracy.
  • Select and remove points individually, or in groups.
  • Shift points around if your initial click was a handful of pixels off.
  • Copy a list of points for pasting into most spreadsheet programs.
  • Export the points as a CSV file or plain text.

Any feedback is welcome, and if you encounter any major bugs, please report them (if they haven't been reported already).

If you enjoyed this post, then don't forget to like, tweet, +1, or upvote on reddit. If you have any questions, comments or complaints, post them using the form below.
. . . . . . . . . . . . . . . . . . . . . . . .

Wednesday, February 19, 2014

On the Elusive Doctor of Philosophy

The number one problem with a PhD is that no one really knows what you need to do to get one. Over the past few years, I've been asked too many questions like "When will you finish?" and "How many pages does your thesis have to be?" The answers are actually surprisingly simple: "When I'm done" and "Enough".

I'll start by telling you about the official Rules and Syllabuses of my faculty. This is a three hundred and something page document that goes into a lot of detail into what you need to get various degrees. For undergraduate courses, it will go into some detail about what courses of specific lengths you need to take, how many credits each course is worth, the minimum number of credits required in each year, and summarises the basic requirements for each course and how they are assessed and examined. When it comes to a PhD, though, the rules are pretty vague. Here's what it says:

Conditions for the award of PhD:

A candidate for the Doctor of Philosophy shall –
  1. present for the approval of the Senate a thesis which must constitute a substantial contribution to the advancement of knowledge in the subject chosen, which thesis must be satisfactory as regards literary presentation.
  2. present himself/herself for such assessment as the Senate may determine.

There's a little more about admission requirements, having an advisor, examiners, something about spending a minimum of two years, and a how many copies of the final thesis need to be handed in (it's five, by the way, not counting the electronic copy), but that covers the gist of it. In summary, I need to do some research and write a thesis on it. Nothing about a page count at all. There's just that one requirement: it "must constitute a substantial contribution to the advancement of knowledge in the subject chosen", whatever that may be.

Naturally though, after a few years of research, one can produce a hell of a lot of rubbish. When writing up a thesis, it's natural to start to wonder how much of that actually needs to go in. How much of it would be considered an acceptable amount of filler material to bulk up the actual content.

My University has been operating for a little under a century, and there's a basement level in one of the libraries that is packed with past theses arranged by subject. You could walk through there to try figure out how long a thesis should be, but there are many there that are five or six hundred pages long, and some that are just a few dozen. However, it's not to difficult to see that theses written under the same advisor often land up being similar lengths.

So, curious as to where I stood (and because I'm sick of endlessly processing results), I went down to the library and pulled down five recent theses in my field that had been written under my advisor. So, instead of plotting the results of my experiments, I plotted a breakdown of each of those theses and compared them to what I have at the moment. The similarities in length and structure are clear.

That's me on the right, just next to the average thesis. My introduction is a couple pages longer than average (with about 2 pages left to write), and my methodology is about 7 pages below average (although I shoved about 20 pages into an appendix, so maybe it's longer than average), and my conclusion is a blank page right now.

It's reassuring to see that my results are the only thing left to type up. And with more than 600 photographs from experiments to process, and 260 GB of data from computer simulations to sift through, I don't think I'm going to have a problem adding the 81 pages that will take me past the average thesis.

I was hoping to finish by the end of this month, but here I am procrastinating again. It looks like I may just need a little bit longer...

If you enjoyed this post, then don't forget to like, tweet, +1, or upvote on reddit. If you have any questions, comments or complaints, post them using the form below.
. . . . . . . . . . . . . . . . . . . . . . . .

Friday, January 17, 2014

On... a fifth arbitrarily defined solar cycle?

It's hard to believe that the Earth has completed almost five trips around the sun (at least, it will have by 19:44 this evening) since I started this blog, one boring Saturday afternoon in 2009. Although I have been considerably less active over the past year, I still managed to find time for 18 posts. I had just under five thousand visits this year (although Blogger is reporting forty thousand for some reason), mostly from the US, South Africa, Canada and the UK. It's difficult to tell what Google searches bought people here, because Google no gives out that information for users who are signed in. It's mildly disappointing, but I'm actually glad that the world is taking privacy a little more seriously these days.

The most popular posts for the year were, well, from previous years actually. My post about petrol price hikes made it into sixth place, after four posts about Minecraft, and the post from 2011 about our Tullen Shears (which, incidentally, are still going). Other popular posts for the year include Amusing Hat Day (which was a bit of a flop - even I forgot my hat), and the posts about classical music (lots of links to a couple hours worth of music, so go listen if you haven't already), the age of star light, and the theory of relativity. I was disappointed that my first video game was not quite as successful (go download it and try it if you haven't. It's actually more fun than it sounds).

Outside of blogging, 2013 was a very eventful year. On the academic side, I actually made some serious progress toward my PhD (despite both a hard drive and a laptop deciding to retire, removing 700GB of simulations between them), and may actually finish it soon, and I was flown to the other side of the world (the USA) to present a paper at my third academic conference. I bought my first car (instead of just driving a car which technically belonged to my parents), and took out my first insurance policy. I think, somewhere during 2013, I turned into an adult. I'm still not exactly sure what that means, and I don't feel any different, but I'm sure I'll figure it out.

Anyway, hopefully I'll still be able to find some time to post for some years to come.

If you enjoyed this post, then don't forget to like, tweet, +1, or upvote on reddit. If you have any questions, comments or complaints, post them using the form below.
. . . . . . . . . . . . . . . . . . . . . . . .

Monday, January 13, 2014

On a Sense of Scale in the Solar System

Cary Huang has an awesome Flash application that you might have seen before, called The Scale of the Universe. Although that app is awesome for getting a sense of the sizes of various objects, it is not very good at conveying a sense of distance. To convey a sense of size and distance, you need to portray both sizes and distances to scale, like the Earth and Moon in the image below. I've always wondered if I could make something that can convey that sense of distance.

Figure: The Earth and Moon with both sizes and distances to scale. [Source: Wikipedia]

I've been wanting to learn how to use HTML5 canvases and improve my JavaScript knowledge for a while, so I realised that this was a perfect opportunity to do that. On Christmas Eve 2013, I sat down and began to program it.

Here is what I came up with.

It's probably not complete, but an app like this could be added to forever, and it possibly will be. I'd like to go further than our Solar System, and add some neighbouring stars, the Milky Way Galaxy and it's neighbours, and so on, until I get to the observable universe.

The rest of this post will talk about the challenges I faced during development, so if that sort of thing doesn't interest you, you can move on. If it does, or you're bored enough not to care, then please read on.

Firstly, the distances between objects in our Solar System are just enormous relative to the sizes of those objects. For example, to display the Earth and Sun together in an image, with the sizes and distances to scale, the image would have to be well over eleven thousand pixels across for the Earth to even show up as a single pixel. That's six times the resolution of a widescreen monitor at 1080p.
The second problem is the range of orders of magnitude that need to be dealt with. Many moons in the solar system have diameters of just a few hundred kilometres and orbit tens or hundreds of thousands of kilometres from their planets, yet the gas giants orbit at distances of a few billion kilometres from the sun.

Thirdly, there is the shear number of bodies in our solar system. The four gas giants have a couple hundred moons between them, and there are more than half a million bodies in our Solar System actively being tracked by the Minor Planet Center.

Finally, the orbit of each body in our solar system traces a unique path in three dimensional space, each with a different inclination, eccentricity, and other orbital parameters. Each body is at a different position in it's orbit, and many of these orbits (especially bodies in the outer solar system) intersect. For example, although Pluto is currently further from the sun than Neptune, it was actually closer than Neptune between 1979 and 1999.

The solutions described below were applied to solve the above problems, in reverse order. Each of these solutions has implications, which are also described below.

The program was restricted to a single dimension. Inclinations were ignored, and distance of each body is averaged across its entire orbit. The implication of this is that all bodies are incorrectly shown on the same plane, and distances between each body are completely inaccurate. Only the average distance from the body to the planet or star about which it orbits is accurate. A future incarnation of the program may remove this restriction.

All eight major planets were included, but only the five dwarf planets recognised by the IAU at the time of writing were included. This means that some bodies such as Sedna, Quaoar, Orcus and Salacia were not included, even though they are widely considered by many astronomers to be dwarf planets. Moons are only included if they are either massive enough to be rounded under it's own gravity, or larger than 10% of their parent planet's diameter. There are only two exceptions: Mars's moons Phobos and Deimos. These were included because they are widely known, and are the best studied moons in our solar system other than our own.

The ability to zoom was essential in order to get a sense of scale over a wider range of distances, with orders of magnitude varying from as little as tens of kilometres up to trillions and beyond. A constantly scaling grid in the background is essential for maintaining the sense of distance as the scale changes.

A minimum size (currently 3 pixels) had to be enforced so that a bodies position could still be seen, even when zoomed too far out for it to be visible. Bodies gradually fade from view as they get too close to their parent bodies on the screen.

I think the final approach comes close to what I originally imagined when I originally came up with the idea, and I hope someone at least finds it interesting and educational.

If you enjoyed this post, then don't forget to like, tweet, +1, or upvote on reddit. If you have any questions, comments or complaints, post them using the form below.
. . . . . . . . . . . . . . . . . . . . . . . .