The thought behind the ParcelSet* series was to have a secondary
program behind the main program that housed the controls and interface.
This secondary program keeps track of all molecules in a parcel. It
also handle the parcels inherent proerties, like temperature, pressure,
humidities variables, etc. The collision
routines (both water and dry),
as well as the plotting is found in these programs.
The Parcel itself is a cube-within-a-cube system. This way, a parcel
could be inside an outer environement -- each having their own temperatures
and pressures, etc. This code was modified slightly for the Evap program,
which has a cube-on-top-of-a-cube system.
Each molecule within a parcel has a myriad of variables that track
everything including speed, which cube its in, size, mass, which other
molecules it may be stuck to, and whether it is visible or not. In
fact, there are 4 stages of invisiblity in ParcelSet*. 1) visible
and can collide with other molecules, 2) visible and can not collide,
3) invisible and can collide (why Condensation program sometimes looks
funny) and 4) invisble and can not collide
Information regarding 3D collions can be found in 3DCollisons,
and Water collisions in Water Collisions.
Boundary collisions are handled here, by simply reversing the applicable
xyz speed component (Ex: a particle hitting the left wall of the cube
would have its y component multiplied by -1.
For plotting these molecules on the screen, it was desired to make
sure that a solid 3D look was maintained, so instead of moving through
the index 1 to N, a for loop is setup to search for molecules from
the back of the cube to the front, drawing them as the loop reached
their coordinates. This does take a little more time, but is worth