Matter can be either in solid,liquid or gas state due to the change in temperature.
This is an animation of 3D particle model for such situation.
Because we need to add enough particles and calculated all the interactions between any two particles. the animation is a slow motion to illustrate a real situation.
[applet code="solidliquidgas3D.solidliquidgas3DApplet.class"  codebase="/ntnujava/ejs/" archive="_library/ejsBasic.jar,solidliquidgas3D.jar" name="solidliquidgas3D"  id="solidliquidgas3D" width="478" height="526"][/applet][/hide]

/htdocs/ntnujava/ejsuser/2/users/ntnu/fkh/solidliquidgas3D2_pkg/solidliquidgas3D2.propertiesFull screen applet or Problem viewing java?Add to exception site list
Press the Alt key and the left mouse button to drag the applet off the browser and onto the desktop. This work is licensed under a Creative Commons Attribution 2.5 Taiwan License
Download EJS jar file(1592.7kB):double click downloaded file to run it. (19 times by 15 users) , Download EJS source (8 times by 5 users) View EJS source

The color for the particle is varying according to the Z coordinate (to help you see the whole structure more easierly)
You can change the gravity and Temperature of the system.
You can also drag the slide on the right (up and down) to see the locations for particles at the selected Z position. (shown in gray at the top:zmax)
The following image shows particles in solid state and form a fix structure. Because of the gravity, there are more particle near the bottom of the container.

If there is no gravity, you will find something similar to the followong