Difference between revisions of "L-systems"

From JSXGraph Wiki
Jump to navigationJump to search
(One intermediate revision by one other user not shown)
Line 42: Line 42:
var turtle = [];
var turtle = [];
var brd = [];
var brd = [];
brd[0] = JXG.JSXGraph.initBoard('box0', {originX: 300, originY: 300, unitX: 1, unitY: 1});
brd[0] = JXG.JSXGraph.initBoard('box0', {boundingbox: [-300, 300, 300, -300]});
turtle[0] = brd[0].createElement('turtle');
turtle[0] = brd[0].create('turtle');
function expander(level,axiom,rules) {
function expander(level,axiom,rules) {

Latest revision as of 09:59, 8 June 2011

Online experiments with Lindenmayer Systems

A Lindenmayer System consists of

  • an initial string called axiom
  • a set of rewriting rules

This is an experimental page, where the Lindenmayer Systems can be changed online. The visualization is done by the JavaScript library JSXGraph. For each system a maximum level is defined. If this value is increased, the complexity of the drawing rises and running time increases, too.


Most of the examples are from the book by Przemyslaw Prusinkiewicz and James Hanan: Lindenmayer Systems, Fractals, and Plants, see the References.

First Example: Sierpinski curve

More examples

The underlying JavaScript code

The underlying JavaScript code for producing Lindenmayer systems