Particles
</COMMENT> <h4>Unfortunately, your browser does not support Java.<BR> A Java applet is the central focus of this page.<BR> You're encouraged to try again using a Java-aware browser.</h4>
A version of this applet using Sun's Java plug-in is available here.

Introduction

This applet displays a system of interacting particles.

You control pressure, temperature and other factors.

Note: drag the scroll bar on the far left hand side to control the volume available.

Click with button 1 to move the particles, and button 2 to delete them.

The applet has two types of particle.

The second has a greater potential size and is not affected by gravity.

The two types of particle are intended to help with study of crystal formation, in compounds with more than one type of molecule.

As it stands, the applet succeeds in exhibiting a number of non-trivial aspects of crystal formation. For example, making a crystal using rapid cooling produces a structure with more faults than the results of a more gradual cooling process.

Many additions need to be made:

  • Bounces are currently a hack - there is no conservation of energy or momentum;
  • There are no attractive forces between the molecues. These are essential for a serious simulation of crystal growth;
  • Add connections between molecules;

Collision detection

A few words about the collision detection algorithm:

Simple collision detection algorithms are O(n^2). I've implemented a scheme using partitioning. Each atom is an a bin. Its position is compared only with those in a Moore neighbourhood surrounding it.

There is some extra housekeeping relating to occasional changes of bin - but essentially, this algorithm is O(n).

It works best if the objects are relatively small. If large objects are introduced, the grid is resized accordingly.

Interactive controls

The applet is interactive, allowing you to apply selection based on organisms visual characteristics using a variety of implements.

  • N and N(2) numbers of the two types of particles;
  • Size and size(2) the particles' respective sizes;
  • Speed - controls the energy/temperature of the system;
  • Friction - controls how much damping is applied to the particles;
  • Gravity - sets the magnitude of the gravitational force;
  • Show - configures how frequently the display is updated;
  • Delay - configures how much delay occurs between frame updates;
  • Step - allows a paused automata to be single-stepped;
  • Pause - allows the automata to be stopped and started;
  • Clear - completely blank all the universe's cells;
  • Restart - resets the particle positions;

Downloads

This applet can also be run as an application. Download this jar file (using shift-click) and double-click on it.

Index | Links

tim@tt1.org | http://hex.org.uk/