Java Programs

All of these programs are written in java. All of the source code and binaries are available here. Included with each program is a run.bat and a run.jar that can be run directly. You will need the java 1.5 runtime environment which is available from Sun here. Each program also has a readme.html. Most also have project files for Eclipse and Netbeans.




Cell Life

Cell Life is a genetic programing environment that tries to emulate the evolution of a program that drives the activity of a multi-cellular creature. Each creature can move, turn, absorb sunlight, steal energy from other cells, and allocate resources to do these activities faster or slower. The color of each cell reflects its allocation of resources. The environment also has a day and night cycle.





Cracks


Cracks simulates the tearing a fabric as the fabric shrinks. It was an attempt to simulate the pattern of cracks that appears in drying mud. Each thread is modeled as a spring. Each thread also has static friction to keep it from moving until enough force is exerted ( Node Slip Force ). Each thread also has a breaking force ( Link Break Force ) and a random about of variation in the breaking force ( Link Break Force Var. ) . The fabric is a grid of equilateral triangles. ( Note: Changing a parameter requires hitting return after it is entered ) . Parameters can be saved to a java serialized object file. Existing parameter files are in the data folder.





Disk Life


Disk Life does a 2-d pool table like simulation on "Disk Creatures". Most of the time in this program went into the physics simulation and not the creatures. The physics engine does a time accurate collision model ( event model with time of collision calculated ). The collision detection algorithm is a "sift and prune" O(N) algorithm whereas brute force pairwise algorithms are O(N^2). The creatures react simply by getting damaged from a collision and create a spring connecting any two colliding disks that can break if stretched too far. When a creature dies an energy disk is created in its place.





Evolve Text


This is a program that evolves sentences given only a number that rates how good its guesses are. The idea came from a example given in "The Blind Watchmaker" by Richard Dawkins. Each letter in the sentence simulates a single gene in an organism that mutates over time. There are other programs out there that do the same thing. Here is one . Its often called the weasel simulator because the goal string in the book was "Methinks it is like a weasel" .





Fractal Shape Maker

This a program that makes fractals by recursively copying and warping simple shapes. The shapes are circle, square,and triangle. The transformations are scale, translate, and rotate. Shapes can increment their hue depending on the transformation. Shapes can also be transparent. Fractals can also be printed at printer resolution. Settings are saved as xml. Some screen images are here.





Graph Placement

This a program takes an arbitrary set of connected nodes and edges and finds an optimum way to lay them out on a 2-d surface. There are several automatic ways of generating node data of different types. The nodes can be manually moved with the mouse. To run chose a pattern from the Patterns menu and press the "Continuous" button.






Grid Flow

This a program tries to optimize the placement of "sink" elements ( blue ) and open elements ( orange ) so that a fluid coming from source nodes ( green ) will support the largest number of sink nodes that mean a minimum inflow flow threshold. The hope was to create a flow network similar to blood vessels that feed cells with food and oxygen.





Grid Fractals

This a program uses basic image processing functions to create random fractal like images. Commands are save to simple text files. The output of each command is viewable at each stage. All random seed values are included in the parameters so that the same image can be reproduced.

    


 



Hex Grid

This a program finds all of the permutations of a fixed number of connected hexagons. The program will also print the shapes to the printer, rendering the shapes to maximize space used. The algorithm starts with a single hexagon and tries to add neighbors to create a unique hexagon pattern that has not been seen. The output from one level feeds the next. If the output is unsorted you can see sibling shapes from the same parent next to each other in the list.

Options:






Text Image

This a program tries to make a unique image from text using the proximity of characters to other characters. The algorithm creates a grid for the characters a-z and a space and arranges them on two axes from most frequent ( top left ) to least frequent bottom right. It the takes a sliding window and for every pair of characters in the window takes the first character as the x coordinate and the second as the y and increments the value of the grid in that location. The values that are added vary. Values near the middle of the window are larger and values near the edges are smaller. The "window end relevance" parameter is this end value.

The current problem with the algorithm is that the data needs to be normalized by the natural frequency of characters so that the graph is uniform and patterns can be easily seen and compared.






Tile


This is a simple program that draws fractal tiling patterns. The idea came from the Mathematical Recreations article in May 2000 Scientific American. The idea is that their are four quadrants of a square. Each square has a simple transformation made of rotations and flips. In each square a tillable shape is draw. To proceed to the next level of tiling the four quadrant square is moved to each of the quadrants applying the transformation for each of the quadrants. This is done for several levels until a complex pattern emerges.

To edit the process select the button for the quadrant you want to edit and then press the button for the operation you want to apply. To change the shape click the shape.

Some screen images are here.