|
Scripts on this page demonstrate the basic functionality of the basic hard-sphere ensemble from which other, more specialized ensembles, are derived. The MolecularApplet Physlet seen on this page is a simple container applet for this ensemble that allows the class to be scripted. It is possible to create overlapping particles but this is non-physical since hard spheres cannot penetrate. We have chosen to ignore interactions between overlapping particles.
The MolecularApplet Physlet is embedded using the following syntax. The [location] parameter should be the URL of the directory that contains the jar file and the [script_name] should be a unique variable name by which JavaScript can refer to this applet.
<applet
CODEBASE=[location]
CODE="molecular.MolecularApplet.class"
ARCHIVE="Molecular.jar"
NAME=[script_name]
ID=[script_name]>
<param name=[par_name] value=[par_Value]>
.
.
</applet>
The applet that you see on this page was embedded as follows.
<applet
CODEBASE="../classes/"
ARCHIVE="Molecular.jar"
CODE="molecular.MolecularApplet.class"
NAME="Molecular" ID="Molecular"
WIDTH="300"
HEIGHT="300"
HSPACE="0"
VSPACE="0"
ALIGN="middle">
<param name="ShowControls" value="true">
<param name="InitialP" value="20">
<param name="FPS" value="50">
<param name="dt" value="0.05">
<param name="PeriodicH" value="false">
<param name="PeriodicV" value="false">
<param name="PixPerUnit" value="10">
<param name = "Border" VALUE = "3">
</applet>