When we were at University, Ben Heley and I created a video in C++ as a piece of coursework. We worked on it quite obsessively, possibly at the expense of more important work.
Ray tracing is a technique to render a scene based upon the path light takes through it. Imagine tracing a beam of light backwards. Start at your eye, go through a pixel in the screen, and into a virtual world. When it hits an object, trace it on to all light sources. Using the texture of the object, the angle at which you hit it, and the colour and intensity of the light sources (and of any ambient light) you can calculate the colour of the pixel.
Ray tracing is typically used to render closed indoor scenes, where each ray travels only a short distance and always hits an object. We decided to turn it on its head and render the solar system, where each ray would have to travel very large distances, and most never hit an object.
We rendered the five planets closest to the sun, and ten moons (two orbiting Mars, seven orbiting Jupiter, and ours). The textures of these bodies were downloaded from NASA.
We reduced all distances by a factor of 500 for aesthetic reasons (if distances were accurate, the every planet would merely be a dot in the sky from every other), and therefore we also reduced the size of the sun. However, the size, orbit speed, spin, and axial tilt of the planets and moons are correct.
Because of deadlines, there were a few enhancements we didn’t manage to make at the time, so I recently found the code and made them. I will post the video tomorrow, when the processing should have finished.