November 26, 2007

links for 2007-11-26

November 21, 2007

links for 2007-11-21

November 15, 2007

Sierpinski Triangle

Inspired by Sam Ruby's Penrose Tiling demonstration this week's programming exercise has been an implementation of a Sierpinski Gasket drawn as an SVG graphic using an L-system in ECMAScript.

To get the progressive drawing effect I made each recursive call to the drawing function via the setTimeout function. With that I found that because setTimeout returns immediately and does not block execution I couldn't pass the operational state of the algorithm via the function's parameters or I would wind up with concurrency issues. This also meant I could not simply iterate through all of the steps in a given rule within one call of the function. I had to actually make successive calls to the drawing function for each element in the current rule. See the source code for the details.

November 1, 2007

links for 2007-11-01