L-systems: Difference between revisions

From JSXGraph Wiki
No edit summary
No edit summary
Line 30: Line 30:
var brd = JXG.JSXGraph.initBoard('box', {originX: 300, originY: 300, unitX: 1, unitY: 1});
var brd = JXG.JSXGraph.initBoard('box', {originX: 300, originY: 300, unitX: 1, unitY: 1});
var t = new JSXTurtleObj(brd);
var t = new JSXTurtleObj(brd);
var axiom = '';
var rules = {};


function expander(level) {
function expander(level) {
Line 94: Line 97:
   t.hideTurtle();
   t.hideTurtle();
   eval(code);
   eval(code);
   var generator = new expander(level);
   var generator = new expander(level,axiom,rules);
   plotter();
   plotter();
   brd.unsuspendUpdate();
   brd.unsuspendUpdate();

Revision as of 18:30, 30 December 2008