Turtle animation of the "8": Difference between revisions
From JSXGraph Wiki
A WASSERMANN (talk | contribs) No edit summary |
A WASSERMANN (talk | contribs) No edit summary |
||
Line 1: | Line 1: | ||
<jsxgraph width="500" height="500"> | <jsxgraph width="500" height="500"> | ||
var brd = JXG.JSXGraph.initBoard('jxgbox',{boundingbox: [-250, 250, 250, -250]}); | var brd = JXG.JSXGraph.initBoard('jxgbox',{boundingbox: [-250, 250, 250, -250]}); | ||
var t = brd.create('turtle',[ | var t = brd.create('turtle',[0, 0], {}); | ||
t.setPenSize(3); | t.setPenSize(3); | ||
var run = function() { | var run = function() { | ||
t.fd( | t.fd(2); | ||
t.lt(1); | t.lt(1); | ||
setTimeout(run,25); | setTimeout(run,25); |