The "Virtual Universe" is intended to help you understand the relative aging and gravitation that occurs among the various stars in our universe. When I first decided to create this "Virtual Universe" applet, I had big ideas in mind. I thought that it would be a great idea to incorporate real time physics in a two-dimensional universe. If I were able to achieve this, the stars would actually gravitate torwards each other in the same manner that they do in our own universe. The only difference would be the fact that the virtual universe only occupies two physical dimensions.
After a few hours of attempting to write the code that would make all of this happen, I realized that it would be unrealistic. Why? The forces that exist in the universe are constantly at work. Gravity doesn't happen every second, every tenth of a second, or even every millionth of a second. It is happening constantly. This is impossible to model with our current technology. Computers can only update something at certain increments.
Initially, I thought that this would not be a problem. I figured that there would only be a small margin of error since the universe would be updated at least on a daily basis. Also, I did not spend enough time considering all of the factors that are involved in real-life physics, such as momentun and inertia. It would have helped had I more knowledge in physics, but I would still have difficulties with the complex calculations that needed to be done. The server that the program is being run on doesn't have the power to accurately perform all of these calculations.
In my first few test versions of the applet, stars were flying out in all directions. When two stars got too close, instead of going into a fixed orbit, they would send each other flying to opposite ends of the universe. Clearly, another method needed to be used. Although I was unable to model real life physics, I was able to come up with a way to simulate gravitation.
The new model is not nearly as complex as my original idea. Whenever the universe is updated, each star is calculated to move a certain distance closer to another star. Hence, gravitation is simulated. The main difference between my new method and actual gravitation is that instead of moving faster as they get closer to eachother, they move slower. So, instead of accelerating, they decelerate. To add realism, objects with greater mass have been programmed to have a greater affect on other stars than those with smaller mass. In the virtual unvierse, the stars will still gravitate together an form clusters, which is a phenomenae that is not uncommon is space.
The most accurate model that has been programmed into the virtual universe is the aging of the stars. Stars age differently according to their spectral types. Each time you return the virtual unvierse, all of the stars will have grown and aged. You can leave your mark on the universe by adding as many stars as you want, therefore affecting the growth and structure of the universe itself. So, as you can see, even though the universe does not model real life exactly, it still provides an exciting way to experiment with the properties of the universe.