Using the applet
Starting and stopping
Repainting
Detailed settings
Method one:
The applet can be started by pressing the START button.
In this case balls will move at the designated speed.
The number of balls to use is designated by the N scrollbar, and they will continue
to appear at the top of the table and fall down with the a certain speed, until N is reached.
This can be interrupted by pressing STOP.
Method two:
The ball is moved one step at a time by pressing STEP. It will move either left (-0,5
)
or right (+0,5
) and stop. The only difference from method one is in the speed: here the ball
is precisely controlled.
Pressing START will switch to method one and cause balls to move at normal speed.
CLEAR clears the rack and moves the ball to the top.
Clicking anywhere with the crosshair cursor causes the table to repaint.
Pressing NEW causes the ball to move to the top.
The exact characteristics of the table used for modeling can be modified with the scrollbars:
- n scrollbar sets the number of columns (there are always n+1 columns) and
must be greater or equals to
1
- p scrollbar modifies the behaviour of each ball, and p is the probability of
a ball falling to the left (causing it to move by
0,5
)
- N scrollbar displays the number of times the whole process of moving the ball
from the top to the bottom is done, that is how many balls will be at the bottom of the table in the end.
This should be at least
1
, but values like 1000
are actually much more usefull.
- speed scrollbar shows the "speed" of the balls. Each step is followed
by an interval of 1/(speed) seconds, except for the maximum speed value, when there is no delay.
More detailed settings and the minimum/maximum limits of N,n,p,speed are set by the the applet tag.