Last updated at 10:33 pm UTC on 24 February 2003
AtomMorph is a subclass of EllipseMorph.
It has the additional instance variable velocity modeled by a Point.
a := AtomMorph new openInWorld.
a color: Color random.
[a bounceIn: World bounds.
(Delay forMilliseconds: 50) wait].
A simulation BouncingAtomsMorph is a container for many AtomMorphs and this container sends the message #bounceIn: to every AtomMorph object it contains.
BouncingAtomsMorph new openInWorld
The BouncingAtomsMorph object is sent the message #step by the World object. (? to check)
The BouncingAtomsMorph serves as a simulation of an ideal gas.
Bring up its halo and you see that it as well serves to simulate an infection spreading (menu entry: 'start infection').
see also StarSqueak