L-systems

From JSXGraph Wiki
Revision as of 19:30, 30 December 2008 by A WASSERMANN (talk | contribs)


var level = 6; var axiom = 'A'; var rules = { 'A':'B-A-B', 'B':'A+B+A'; '+' : '+', '-' : '-' }; var symbols = { 'A':'F', 'B':'F', '+':'+', '-':'-', '[':'[', ']':']' }; var angle = 60; var len = 500/Math.pow(2,level); t.setPos(-250*Math.pow(-1,level),-250); t.rt(90*Math.pow(-1,level));