Difference between revisions of "Function graph animation"

From JSXGraph Wiki
Jump to navigationJump to search
Line 1: Line 1:
 
<jsxgraph width="600" height="600">
 
<jsxgraph width="600" height="600">
 +
  var f = function(x) { return Math.sin(x); };
 +
 
   var brd = JXG.JSXGraph.initBoard('jxgbox', {boundingbox:[-5,2,5,-2], axis:true, keepaspectratio:false});
 
   var brd = JXG.JSXGraph.initBoard('jxgbox', {boundingbox:[-5,2,5,-2], axis:true, keepaspectratio:false});
 +
 +
  var start = -4,
 +
      end = 4,
 +
      turtle = brd.create('turtle', [start, f(start)]);
 +
 +
  turtle.moveTo(0,0);
 +
 
</jsxgraph>
 
</jsxgraph>

Revision as of 09:20, 31 October 2012