Crystal Applet


See Instructions below.

Project Java Webmaster: Glenn A. Richard
Center for High Pressure Research
SUNY Stony Brook


<> </COMMENT>


About This Applet

This applet simulates crystal growth using a Monte Carlo strategy to determine locations where growth units will settle. Immediately after each growth unit settles, a Monte Carlo test determines whether it will remain in place or remove itself from the crystal.

This is a pre-beta version of the applet, not intended for public use.

When the applet is first loaded, default values appear on the control panel. You may leave them as they are, or change any or all of them. To initialize a blank crystal face map based on the values of the parameters, click the "Initialize" button. Subsequently, a "Step" button appears that you can click to drop growth units onto the crystal face. The number dropped and tested for each click is equal to the step size, but note that some of the units may not remain in place, depending on the outcome of their Monte Carlo tests. On the map, blue represents the lowest elevation and red, the highest elevations. At or above a certain level, determined by the number of colors available to represent levels, all elevations will be red.

While a crystal map is in place, the parameter values cannot be edited. Clicking the "Start Over" button will remove the crystal map from the applet window and allow you to edit the parameters.

Each growth unit on the map surface may have up to 5 neighbors. These neighbors are:

  1. Adjacent units on the same level, in the following directions:
    1. north
    2. south
    3. east
    4. west
  2. The unit underneath

Sticking coefficients are calculated by totalling the parameters that correspond to each neighbor that is present. For example, if you set the following paremeter values:

then, if neighbors are present under (as is always the case), to the north, and to the east, the sticking coefficient is equal to 12.

The Monte Carlo determination of whether a unit sticks or leaves after settling is controlled by the "Rand Max" and "Rand Min" parameters.  After each unit settles, a random integer is generated with a value between "Rand Min" and "Rand Max", inclusive.  Each integer in that range has an equal probability of being chosen.  If the integer exceeds the unit's sticking coefficient, the unit leaves the crystal.  If the number is less than or equal to the sticking coefficient, the unit sticks, and remains in place permanantly.