Simulate the forming of crystal lattice

Concepted and developed by Henrik Somogyi, 2021

           

Your browser does not support the HTML 5 Canvas

Users Guide

This animation mimics the freezing, the forming of crystal lattice. Atoms attract (when farther) or repulse (when too close) each other. Attraction force is inverse proportional with square of distance. Repulsion is inverse proportional with 3rd power of distance. Atoms bounce back from the sides (without loss of motion energy). The initial atom speeds are zero. Initial atom location is random (uniform distribution). When friction is on, then each atom loses a proportional part of its motion energy by time. Total sum of motion energy is displayed. Friction on/off as well.

Watch how the matter gets into circular shape (surface tension) and how atoms get into a regular grid at low temperature.

Button "Cool down" : when pressed, each atom loses a fix percentage from its motion energy.
Button "Warmp up" : when pressed, each atom loses a fix percentage from its motion energy.
Button "Reset" : when pressed, each atom gets to a random start position, with zero speed.
Button "Friction" : toggles if friction is on or off.