Source
Code
This is a snowflake applet that shows
various patterns of snowflakes similar to those seen in real
snowflakes. The applet is displayed on a hexagonal grid, since
all the molecules of a snowflake ultimately lie on a hexagonal
grid. In the actual process of snowflake growth not every part
of this grid ends up being filled with ice. The reason behind
this is that whenever a piece of ice is added to the
snowflake, there is some heat released which tends to inhibit
the addition of further pieces of ice nearby, thereby giving
rise to different intricate patterns.
Applet
Description
This applet
displays the seven-sum 3-state
totalistic rules. The user clicks on any hex grid cell to
set the seed. Then the user chooses one of the rules and
hits start to view the pattern produces by that rule. This
applet also provides the zoom facility which the user can
use to zoom in and zoom out the pattern. The feature of
clicking on any hex cell in the grid allows a user to play
around and experiment with different seed values.
Hexlife
- This is modeled based on Conway's Game of Life,
but on a hexagonal grid. It applies rule based on the sum
of 12 neighbors.
As
seen from above figure, the first tier 6 neighbors are shown
with red color and they have weight as 1.0 and second tier 6
neighbors are shown with blue color and have weight as 0.3.
The following rule is applied :
-
A
cell becomes live if this sum falls within the range
of 2.3 - 2.9, otherwise remains dead
-
A
live cell survives to the next generation if this sum
falls within the range of 2.0 - 3.3. Otherwise it
dies (becomes an empty space)
In
the applet, BLUE color indicates that a cell is born and
GREEN color indicates that a cell survives to the next
generation.
Applet
Controls and Operation
Click
on any hex cell to set the seed first before starting the
rule.
Start
-- Starts displaying the chosen rule.
Stop
-- Stops processing the rule.
Resume
-- Resumes processing from where it had left off.
Clear
-- Clears the grid.
Snowflake and
Hexlife radio buttons - These are used to select what you want to display.
Select snowflakes or hexlife to view by selecting the appropriate radio
button.
Snowflake
Rule
comboBox -- Provides a selection of snowflake rules that
the user can select to view.
Hexlife
Pattern comboBox -- Provides a selection of initial seed
population to start the hexlife rule. The user doesn't
have to select any pattern. The seed population can be set
by just clicking on the grid instead of selecting from the
comboBox.
Load
Hexlife Pattern - This button is used to load the selected
hexlife pattern from the comboBox. This button will work
only when hexlife radio button is set.
Zoom
-- Sets the zoom level of the hexagonal grid.
Delay
-- Controls the speed of the pattern display
(default is set to zero delay). The user can increase the
delay if he feels the pattern is displaying too fast.
My
Favorite Rule is snowflake7
|