L-systems: Difference between revisions
From JSXGraph Wiki
A WASSERMANN (talk | contribs) No edit summary |
A WASSERMANN (talk | contribs) No edit summary |
||
Line 32: | Line 32: | ||
function expander(level,axiom,rules) { | function expander(level,axiom,rules) { | ||
this.axiom = axiom; | |||
this.rules = rules; | this.rules = rules; | ||
this.source = (level>1) ? new expander(level-1,axiom,rules) : (new function() { | this.source = (level>1) ? new expander(level-1,axiom,rules) : (new function() { | ||
// Axiom: | // Axiom: | ||
this.code = | this.code = axiom; | ||
this.pos = 0; | this.pos = 0; | ||
this.next = function() { | this.next = function() { | ||
Line 87: | Line 87: | ||
} | } | ||
return null; | return null; | ||
} | } | ||
function run() { | function run() { |
Revision as of 19:15, 30 December 2008