L-systems: Difference between revisions

From JSXGraph Wiki
No edit summary
No edit summary
Line 5: Line 5:
<script type="text/javascript" src="http://jsxgraph.uni-bayreuth.de/distrib/jsxturtle.js"></script>
<script type="text/javascript" src="http://jsxgraph.uni-bayreuth.de/distrib/jsxturtle.js"></script>
<form><textarea id="inputtext1" rows=3 cols=35 wrap="off" style="width:600px;">
<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()">
var level = 6;
var level = 6;
var axiom = 'A';
var axiom = 'A';
Line 27: Line 24:
t.setPos(-250*Math.pow(-1,level),-250);  
t.setPos(-250*Math.pow(-1,level),-250);  
t.rt(90*Math.pow(-1,level));  
t.rt(90*Math.pow(-1,level));  
</textarea><br />
<input type="button" value="run" onClick="run(1)">
<input type="button" value="clear" onClick="clearturtle()">
</form>
</form>
<div id="box" class="jxgbox" style="width:600px; height:600px;"></div>
<div id="box" class="jxgbox" style="width:600px; height:600px;"></div>

Revision as of 19:30, 30 December 2008