User:Tamas Bates/RWRM/HW1
Approximation of Triangular Crystal Growth
A small program written in Javascript to create fractal-like images made of triangles in a user's web browser. The sequence begins with a single "seed" triangle, created and positioned near the center of the viewer's screen as part of the program's initialization. From each of the triangle's corners a new, slightly smaller, triangle grows out along an axis which bisects the corner it was created from. This process is continued for each of the new "child" triangles and their resulting children, with care taken to avoid growing new triangles which overlap any existing triangles. After some time, the resulting final shape is approximately hexagonal (though not all sides are of equal length) and contains many pseudo-hexagonal pockets, some of which are filled with spiralling intrusions of ever-shrinking triangles.
Booze Bot
An Arduino Uno connected to a bank of relays wired up to the power switches on several small vacuum pumps. Each pump rests in a cardboard frame on top of a milk crate, which has the open side facing the user. A funnel beneatch each pump routes fluid into the crate, depositing any liquid into a larger funnel balanced above a drinking glass. The input side of each pump is connected to a length of rubber tubing, which is inserted into a collection of liquors. Pressing a button connected to the Arduino activates the pumps and produces a cocktail for the user.
Lightning Bolt Generator
A small program written in Lua. It begins by drawing a solid black background on the user's screen. At the top of the screen a clump of colored pixels forms, white at the center and fading to dark purple and black at the edges. These expand downward in an erratic fashion, carving out a jagged path toward the bottom of the screen, occasionally branching out into some smaller paths during the descent. The result is like watching lightning strike in slow motion. At any time the user can restart the process to generate a new and different lightning bolt.