Arc length: Difference between revisions

From JSXGraph Wiki
No edit summary
No edit summary
Line 22: Line 22:
   }   
   }   
}
}
var approx = brd.createElement('curve',[[0],[0]], {strokeColor:'red'});
approx.updateDataArray = function() {
  var i;
  var m = n.Value();
  m = Math.floor(m);
  var d = (5-0)/m;
  this.dataX = [];
  this.dataY = [];
  this.dataX[0] = 0.0; 
  this.dataY[0] = f(0.0); 
  for (i=1;i<=m;i++) {
    this.dataX.push(0.0+i*d); 
    this.dataY.push(f(0.0+i*d)); 
  } 
}





Revision as of 12:53, 7 June 2009

The underlying JavaScript code