Logo

 Simulum

Simulum at SourceForge
introduction
screen shots
samples
old samples
physics
news
download
technics
planning
contact
site map
Technical Background and Implementation <previous     next>

The whole project stands under the Lesser GNU General Public Licence (LGPL). The programming language is Java.

Mouse Actions

The viewer parameters can be changed by mouse actions:

  • Rolling the mouse wheel changes the distance.
  • Rolling the mouse wheel while pressing the right mouse button changes the star brightness.
  • For the manual movement methods dragging the mouse moves the viewpoint. If the movement method is manualDelay a fast drag gives the camera an appropriate angular momentum.

Camera Parameters

sensitivitySensitivity of photo plate. If a star is too far away it's brightness might not be high enough to create a dot on the photo plate. Increasing the sensitivity of the photo plate helps to solve the problem.
ZoomZoom factor for photo plate. The projection size on the photo plate can be changed with the value of this parameter. The optimal value for this parameter depends on the screen resolution and your distance from the monitor. A projection size of 1 should be seen in an 45 degree angle. If we assume that you see your monitor (height) in an 20 degree angle, we can calculate as follows:
zoom = screen height in pixel / 2 / tan(10)
That means zoom should have a value between 2000 and 3500. Other values are possible but create a nonnatural perspective.
radiusDistance of camera.
snapshotNumber of exposure. Before that number of pictures the photo plate is cleared again. If this parameter has an value greater than zero one can see the orbits. If the movement is slow the sensitivity parameter should be low.
movementCamera movement mode. The first two manual and manualDelay are the major ones. Look above for a description how to interact with this mode. The circular movement circles around the Z-axis and in addition circularNormale changes the viewing direction to the star field center. The linear movement changes the Z coordinate until it reaches the zero point.

Gravity Parameters

starsThese number of stars are generated. If the number is other than before a new star field is generated. The stars are randomly placed within a sphere of radius 0.5 by an uniform distribution. Their initial velocity is 0, their mass is 1. Although you can enter a great number here, the program might not be able to deal with this big number. My computer can deal with 1,000,000 stars if gravitation is off. Otherwise a number of 1,000 stars is a maximum for me.
gammaThe gravity constant.
deltatCurrently we just use Euler's method to calculate star positions and velocities. The following formulas are used:

star.velocity[i] = star.velocity[i] - deltat * gamma * sum(j, star[j].mass * (star[i].position - star[j].position) / |(star[i].position - star[j].position| ^ 3)

star[i].position = star[i].position[k] + deltat * star.velocity[i]

This is a very simple single step method. Some more information about better approximation methods to solve the N-body problem can be found at Bob Jenkins' web site and parallel N-body simulations.

But you could plug in your own better Gravity engine just by setting the -Dmulumis.GravityFactory=<new AbstractGravityFactory> parameter during the VM start.

Additional Applet Parameters

Additional to the parameters above the following are only visible as applet parameters.

deltaThis parameter is only used for linear, circular or circularNormale movement. It is the increment distance (exact: delta * (radius + 1)) or angle (radian measure) per movment.
xthetaThis parameter is only used for manualDelay movement. It is the initial increment angle (radian measure) rotation around the x-axis per viewpoint movment. This parameter can be interactive modified by mouse dragging.
ythetaThis parameter is only used for manualDelay movement. It is the initial increment angle (radian measure) rotation around the y-axis per viewpoint movment. This parameter can be interactive modified by mouse dragging.
gravityThe values on or off denote the gravity activity. Without gravity much more stars can be animated because the gravity engine costs a lot of processing time.

update 2006-03-10 02:55:25+0100