Arc length: Difference between revisions

From JSXGraph Wiki
No edit summary
No edit summary
Line 9: Line 9:
   var i;
   var i;
   var m = n.Value();
   var m = n.Value();
   m = Math.round(m);
   m = Math.floor(m);
   var d = (5-0)/m;
   var d = (5-0)/m;
   this.dataX = [];
   this.dataX = [];
Line 15: Line 15:
   this.dataX[0] = 0.0;   
   this.dataX[0] = 0.0;   
   this.dataY[0] = f(0.0);   
   this.dataY[0] = f(0.0);   
   for (i=1;i<m;i++) {
   for (i=1;i<=m;i++) {
     this.dataX.push(0.0+i*d);   
     this.dataX.push(0.0+i*d);   
     this.dataY.push(f(0.0+(i-1)*d));   
     this.dataY.push(f(0.0+(i-1)*d));   

Revision as of 12:52, 7 June 2009

The underlying JavaScript code