Turtle spiral: Difference between revisions

From JSXGraph Wiki
No edit summary
Line 50: Line 50:


===External links===
===External links===
* [http://www.geogebra.org/de/wiki/index.php/Turtlegrafik Compare with GeoGebra]
* [http://www.geogebra.org/de/wiki/index.php/Turtlegrafik A similar construction with GeoGebra]
* [http://wiki.zum.de/Turtle-Grafik ZUM-Wiki's Turtle graphics page]
* [http://wiki.zum.de/Turtle-Grafik ZUM-Wiki's Turtle graphics page]


[[Category:Examples]]
[[Category:Examples]]
[[Category:Turtle Graphics]]
[[Category:Turtle Graphics]]

Revision as of 20:24, 1 April 2009


Source code

<jsxgraph width="600" height="600">
var brd = JXG.JSXGraph.initBoard('jxgbox', {originX: 300, originY: 300, unitX: 1, unitY: 1});
var t = brd.createElement('turtle');

function run() {
  brd.suspendUpdate();
  var code = $('inputtext').value;
  if (code=='') { return; }
  eval(code);
  brd.unsuspendUpdate();
}
function clearturtle() {
  t.cs();
}
run();
</jsxgraph>

External links