Turtle animation of the "8": Difference between revisions

From JSXGraph Wiki
No edit summary
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',[100,-50],{strokeOpacity:0.7,fillColor:'#ff8800',fillOpacity:0.2});
var t = brd.create('turtle',[0, 0], {});
t.setPenSize(3);
t.setPenSize(3);
   
   
var run = function() {
var run = function() {
   t.fd(5);
   t.fd(2);
   t.lt(1);
   t.lt(1);
   setTimeout(run,25);
   setTimeout(run,25);

Revision as of 07:36, 28 August 2013