Simulation Four Body Kepler Problem

Full Version 1.0 - 2002 Steffen Maus und Daniel Roth - All rights reserved!

Four masses interact with each other according to the gravitational law. The path of the masses in local and in momentum space is displayed while they interact with each other.

By clicking onto a mass and by moving the mouse (while the mouse button is still pressed) the initial position of a mass can be changed. By clicking onto a point outside a mass, a line representing the initial velocity of the mass can be defined.

These initial conditions can also be defined by the input of numeric values into text fields.

Parameter changes have to be confirmed by hitting the ENTER key.

  • The background of the animation, the background of the graph and the appearence of the bodies can be changed by editing the ".gif" bitmap files in the directory.
  • This Applet is "scriptable". This means that it can be configured and controled and that physical parameters of the simulation can be accessed by using JavaScript methods inside the embedding web page. More information about scripting can be found in the file scripting.html.

    The following methods are available:
    • jsStart()
      starts simulation

      stops simulation

      resets simulation

      make user interface elements visible or invisible:

        state = "yes": make user interface element visible
        state = "no": make user interface element invisible

        element = "V0Box": text field for initial velocity input
        element = "AlphaBox": text field for initial angle input
        element = "MBox": text field for mass input
        element = "BodyChoice": choice box for body choice
        element = "TrackmarksBox": checkbox for drawing trackmarks
        element = "Start": button for starting/stopping simulation
        element = "Reset": button for reseting simulation
        element = "trackmarks": display of trackmarks during flight of projectile
        element = "setup": display of arrow representing initial velocity during setup

      set mass of body number "bodynr"=0,1,3 or 4  (default values = 1000;10000;1000;1)


      set initial velocity of body number "bodynr" (default values = 9;0;9;18)

      set initial angle of body number "bodynr" (default values = 270;0;90;90)

      set initial position of body number "bodynr" (default values (x,y)= (100,170); (200,170); (300,170,); (310,170))

      set time step for numerical caluclation (default value = 0.1s)

      get actual x-position of body number "bodynr" (value type is double and not Integer)

      get actual y-position of body number "bodynr" (value type is double and not Integer) 

      get actual x-component of body number "bodynr" (value type is double and not Integer)

      get actual y-component of body number "bodynr" (value type is double and not Integer)

      get actual time of simulation (value type is double and not Integer