L-systems: Difference between revisions
From JSXGraph Wiki
A WASSERMANN (talk | contribs) No edit summary |
A WASSERMANN (talk | contribs) No edit summary |
||
Line 1: | Line 1: | ||
<html> | <html> | ||
<link rel="stylesheet" type="text/css" href="http://jsxgraph.uni-bayreuth.de/distrib/jsxgraph.css" /> | <link rel="stylesheet" type="text/css" href="http://jsxgraph.uni-bayreuth.de/distrib/jsxgraph.css" /> | ||
Line 35: | Line 34: | ||
var brd = []; | var brd = []; | ||
brd[0] = JXG.JSXGraph.initBoard('box0', {originX: 300, originY: 300, unitX: 1, unitY: 1}); | brd[0] = JXG.JSXGraph.initBoard('box0', {originX: 300, originY: 300, unitX: 1, unitY: 1}); | ||
t[0] = new JSXTurtleObj(brd[0]); | |||
function expander(level,axiom,rules) { | function expander(level,axiom,rules) { | ||
Line 100: | Line 99: | ||
if (code=='') { return; } | if (code=='') { return; } | ||
t = turtle[nr]; | t = turtle[nr]; | ||
/* | |||
t.cs(); | |||
t.hideTurtle(); | t.hideTurtle(); | ||
eval(code); | eval(code); | ||
var generator = new expander(level,axiom,rules); | var generator = new expander(level,axiom,rules); | ||
plotter(generator,symbols,len,angle,t); | plotter(generator,symbols,len,angle,t); | ||
*/ | |||
brd[nr].unsuspendUpdate(); | brd[nr].unsuspendUpdate(); | ||
} | } | ||
Line 113: | Line 114: | ||
</script> | </script> | ||
</html> | </html> | ||
[[Category:Examples]] | [[Category:Examples]] | ||
[[Category:Turtle Graphics]] | [[Category:Turtle Graphics]] |
Revision as of 19:42, 30 December 2008