PHY 411/506 Spring 1999
Java Applet: Percolation
This applet demonstrates site percolation on a two-dimensional square lattice.
The picture on the left represents an LxL lattice.
Occupied sites are shown by colored circles, and empty sites are not colored.
A site which belongs to a finite (non-spanning) cluster is colored blue,
and sites belonging to a spanning cluster are colored green.
A cluster can be highlighted in red by moving the mouse pointer onto
any of its sites.
The data window on the upper right of the applet displays the following
The control panel allows you to adjust the following parameters:
- The total number of occupied sites
- The number of finite (non-spanning) clusters
- The mean size of finite clusters
- If the mouse pointer is over the lattice, the following are
- The x and y coordinates of the site under the mouse
- The random number r associated with this site when the
sample is created
- If the mouse pointer is inside a cluster, the following are
- The number of sites in the cluster
- The Hoshen-Kopelman proper label of the cluster
- If the sample is percolating, the following are displayed:
- The number of sites in the spanning cluster
- The observable Poo
- The linear size L of the lattice
- 4 radio buttons to select the definition of a spanning cluster:
- Vert: the spanning cluster must run from top to bottom
- Horz: the spanning cluster must run from left to right
- Both: the spanning cluster must run from top to bottom
AND also from left to right
- VorH: the spanning cluster can run from top to bottom
OR from left to right
- The New Sample button creates a new sample by assigning a fresh
set of random numbers ri to the lattice sites
- The slider can be used change the percolation parameter p
Click for java source file: Percolation.java.
This applet uses the comphys