Space is Big
Originally I was thinking of having 2 topics for this course, games and scientific visualization. I dropped the sci-viz angle since that required some background in user interface design and human computer interaction, but I kept this assignment which does do some of both.
The purpose of this project is to give you some experience programming in Open Inventor and at the same time create the backdrop for the game to be created in Project 2. In this assignment you will be modeling our solar system and the nearest stars to our own. So aside from learning some OpenInventor, you get to learn some astronomy, and gain some experience in trying to visualize things are hard to visualize.
Specifically, for the solar system you will include the sun, the 9 planets, and any moons over 100km in radius. The moons should orbit their planet, the planets should rotate about their axis, and the planets should revolve around the sun with the appropriate periods. The planets (and as many moons as possible) should have appropriate texture maps. The planets that have rings should show them. You should also come up with some interesting texture map for the sun. You will want to be able to vary the speed at which time is passing.
For the nearbye star systems you will include the 100 nearest star systems (many of which may have multiple stars). The stars should have an appropriate position, radius and colour. You will notice that while the solar system is pretty flat, that the nearbye stars occupy a volume. We will assume that the stars are in static positions for this assignment.
Now so far, most of the assignment is parsing data files and generating models. Its nice that the planets and the stars are basically spheres so the modelling for this assignment is pretty trivial.
However scale is an interesting issue and needs some creativity. Computer graphics does allow us to build the solar system and even the nearest star systems in scale with the sizes of the planets ... unfortunately as you will see, space is big ... really really big ... so that while you can show things in scale, its really hard to see them. Once you see the sun and planets in scale with their orbits you will know what I mean. Once you add in the Centauri system, nearest to our own, you will really know what I mean.
For showing the planets it can be helpful to show their orbits (which you can assume are circular for this assignment, though the orbits should be appropraitely angled since they do not all lie in the same plane.) You will want to have some control that allows you to change the scale of the radius of the sun and planets and moons within their given orbits to make them more visible. The goal is to be able to show reality, and then to allow the user to augment reality to gain understanding.
With certain data such as this and this you could calculate the actual positions of the planets for any data. For this assignment you do not need to do this, just put the planets in some nice random positions in their orbits, but depending on the game in Project 2 you may want to compute the correct positions.
You will want to put a point light source where the sun is, but also have enough ambient light that the back sides of the planets are still visible.
You will need to view the data from two types of viewpoints. One is the 'flying around' viewpoint where you are flying through the data of the solar system and the controls are forward/back, roll, pitch and yaw. The other is 'map view' which will show your location in the solar system as well as allowing the user to zoom (within the soalr system and out to the stars), tilt, and pan the solar system. You should have both views visible at the same time.
You should label the star systems with floating text to help identify them.
- reference for the planetary data:
- reference for the star data
Now its very likely that the game in the second assignment will involve you moving between star systems so you should have some way to read the one solar system in this assignment in from a data file, so that in the next assignment you will be able to add star systems to several of the other stars.
Once the solar system is built we can look at another effect of scale, related to the speed of light. Light moves at 299,792,458 meters per second in a vacuum. You should allow the user to send out a 'ping' from their current position at the speed of light and visualize the expanding sphere (or ring) of the signal moving through the solar system in the same time-scale that the solar system is moving.
Once you have the solar system and the other stars built you will see that reality presents some serious limitations in creating an interesting game, so we will need to make some unrealistic assumptions for the game Project 2.
- In about 4 billion years the sun will start to run out of helium and expand into a red giant where it will be roughly 40 times its current diameter. Its pretty impressive to take your 'in scale' version of the solar system and replace the current sun with the red giant version.
After each project we will spend some time in class with each person giving a short 10 minute presentation on what they did in their project and getting feedback from the rest of the class. Be prepared to show your work, and discuss why you did what you did and how you did what you did.