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: | ||
===Sierpinski curve=== | |||
<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 34: | Line 35: | ||
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}); | ||
turtle[0] = new JSXTurtleObj(brd[0]); | |||
function expander(level,axiom,rules) { | function expander(level,axiom,rules) { | ||
Line 112: | Line 113: | ||
</script> | </script> | ||
</html> | </html> | ||
===Quadratic snowflake variation=== | |||
<html> | |||
<form><textarea id="inputtext1" rows=3 cols=35 wrap="off" style="width:600px;"> | |||
</textarea><br /> | |||
<input type="button" value="run" onClick="run(1)"> | |||
<input type="button" value="clear" onClick="clearturtle(1)"> | |||
</form> | |||
<div id="box1" class="jxgbox" style="width:600px; height:600px;"></div> | |||
<script language="JavaScript"> | |||
brd[1] = JXG.JSXGraph.initBoard('box1', {originX: 300, originY: 300, unitX: 1, unitY: 1}); | |||
turtle[1] = new JSXTurtleObj(brd[1]); | |||
</script> | |||
</html> | |||
===Dragon curve=== | |||
[[Category:Examples]] | [[Category:Examples]] | ||
[[Category:Turtle Graphics]] | [[Category:Turtle Graphics]] |
Revision as of 19:42, 30 December 2008
Sierpinski curve
Quadratic snowflake variation