Class Index | File Index

Classes


Class Riemannsum


Extends JXG.Curve.
This element is used to provide a constructor for Riemann sums, which is relaized as a special curve.
Defined in: Curve.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Riemannsum(f,n,type_,a_,b_)
Fields borrowed from class JXG.Curve:
curveType, doAdvancedPlot, numberPoints, numberPointsHigh, numberPointsLow
Fields borrowed from class JXG.GeometryElement:
ancestors, board, childElements, dash, descendants, draft, fillColor, fillOpacity, fixed, hasLabel, highlightFillColor, highlightFillOpacity, highlightStrokeColor, highlightStrokeOpacity, highlightStrokeWidth, id, isReal, layer, name, needsRegularUpdate, needsUpdate, notExistingParents, numTraces, quadraticform, shadow, stdform, strokeColor, strokeOpacity, strokeWidth, symbolic, trace, traces, transformations, visible, visProp
Methods borrowed from class JXG.Curve:
allocatePoints, cloneToBackground, generateTerm, getLabelAnchor, hasPoint, maxX, minX, notifyParents, update, updateCurve, updateDataArray, updateRenderer, X, Y
Methods borrowed from class JXG.GeometryElement:
addChild, addLabelToElement, animate, clearTrace, hideElement, highlight, labelColor, noHighlight, remove, setArrow, setProperty, showElement
Class Detail
Riemannsum(f,n,type_,a_,b_)
// Create Riemann sums for f(x) = 0.5*x*x-2*x.
  var s = board.create('slider',[[0,4],[3,4],[0,4,10]],{snapWidth:1});
  var f = function(x) { return 0.5*x*x-2*x; };
  var r = board.create('riemannsum', 
              [f, function(){return s.Value();}, 'upper', -2, 5],
              {fillOpacity:0.4}
              );
  var g = board.create('functiongraph',[f, -2, 5]);

				
				
				
				
					
						
Parameters:
{function_number|function_string|function_function|number_function|number} f,n,type_,a_,b_
Parent elements of Riemannsum are a function term f(x) describing the function graph which is filled by the Riemann rectangles.

n determines the number of rectangles, it is either a fixed number or a function.

type is a string or function returning one of the values: 'left', 'right', 'middle', 'lower', 'upper', or 'trapezodial'. Default value is 'left'.

Further parameters are an optional number or function for the left interval border a, and an optional number or function for the right interval border b.

Default values are a=-10 and b=10.

See:
JXG.Curve

Documentation generated by JsDoc Toolkit 2.4.0 on Tue Oct 25 2011 00:43:21 GMT-0000 (UTC)