Turtle spiral: Difference between revisions

From JSXGraph Wiki
No edit summary
No edit summary
Line 1: Line 1:
<html>
<html>
<form><textarea id="inputtext" rows=5 cols=35 wrap="off" style="width:600px;">  
<form><textarea id="inputtext" rows=5 cols=35 wrap="off" style="width:600px;">  
for (var i=0;i<100;i++){
for (var i=0;i<200;i++){
  t.forward(i*0.5);
  t.forward(i*0.5);
  t.left(30);
  t.left(30);

Revision as of 16:37, 25 March 2009


Source code

<link rel="stylesheet" type="text/css" href="http://jsxgraph.uni-bayreuth.de/distrib/jsxgraph.css" />
<script type="text/javascript" src="http://jsxgraph.uni-bayreuth.de/distrib/prototype.js"></script>
<script type="text/javascript" src="http://jsxgraph.uni-bayreuth.de/distrib/jsxgraphcore.js"></script>
<form><textarea id="inputtext" rows=3 cols=35 wrap="off" style="width:600px;">t.fd(100);</textarea><br />
<input type="button" value="run" onClick="run()">
<input type="button" value="clear" onClick="clearturtle()">
<input type="button" value="clear log" onClick="clearlog()">
</form>
<div id="box" class="jxgbox" style="width:600px; height:600px;"></div>
<pre id="logwindow" class="javascript javascript" style="font-family:monospace;"></pre>