Automatons
Software devices to entertain and enlighten. Step right up...
Almost all of these automatons require browsers to support both Javascript, and the Scalable Vector Graphics (SVG) standard. As of August, 2008, the primary examples of such browsers are Apple's Safari (and other WebKit-based browsers), and Mozilla's Firefox. Notably, Microsoft's Internet Explorer does not support SVG, even though it has been an official World-Wide Web Consortium standard since 2001. (Microsoft has been a destructive and lazy monopoly. 'nuff said.)
Clock I
Clock I is a trivial demonstration of using Javascript to animate Scalable Vector Graphics (SVG). (See also the related blog entry.)
Clock III
Clock III is a clock that graphically represents the location of the current time in the current year, month, week, day, hour and minute. Highly accurate computation of equinoxes, solstices and Moon phases (lunar illumination) is thrown-in for good measure. The clock face can be rotated by dragging. (See also a related blog entry.)
Moon Illumination, A Perpetual Table
This moon illumination table is a perpetually current table of moon illumination for the current month.
Equinoxes and Solstices, A Perpetual Table
Current Equinoxes and Solstices is a perpetually current table of dates and times for equinoxes and solstices. The table begins ten years prior to the current year, and extends to ten years afterward.
Rule 30 One-Dimensional Cellular Automaton
A one-dimensional cellular automaton constitutes pretty much the simplest program that can exist, but, in a few cases, they nonetheless produce behavior of unlimited complexity. Steven Wolfram's famous "rule 30" cellular automaton is the best example, and is demonstrated by the programs below. Both programs compute the same randomly seeded, 192-cell automaton where the left and right edges wrap around, so there is no left or right edge for the automaton to bump into. The first implementation displays the output of the automaton in a conventional two-dimensional grid. The second displays the output on the inside of three-dimensional cylinder, thereby eliminating the illusion of left and right edges.
These implementations both work, albeit glacially, in Safari 3. They work slowly in the nightly builds of what will be Safari 4. They freeze Firefox 2 completely, and almost completely freeze Firefox 3. Plainly, there are some serious performance problems (if not outright bugs) even in the most modern browsers.
- Rule 30 Cellular Automaton – Click to start/stop.
- Rule 30 Cellular Automaton, Cylindrical Mapping – Click to start/stop. Drag to rotate.
(See also the related blog entries: SVG "Rule 30" Denial-of-Service, and Rule 30 Automaton Cylindrical Projection.)
Rotating Spiral
A rotating spiral. You are getting sleepy, very sleeeeepy.... Some people attribute hypnotic qualities to these spirals. I just think they make an interesting visual effect. Click to start it. Click again to stop it. Click a third time to start it rotating in the opposite direction. And so on. This automaton is handled well by Safari 3.1 and Firefox 3. Firefox 2 will run it, but too slowly to make it interesting.
Maze
A random maze generator - see a new maze every time. (Reload
the maze and watch it change!) If you want to alter the complexity of the maze, you'll have
to save the source of the maze, and tweak the two values (height and width) that are passed
to the Maze function (look for the line new Maze(75, 75);
very near the bottom of the file), and you can have mazes of any size.