JavaScript must be enabled in order for you to use JSXGraph and JSXGraph reference. However, it seems JavaScript is either disabled or not supported by your browser.

Class Index | File Index

Elements

Classes


Class Inequality

JXG.GeometryElement
   ↳ JXG.Curve
         ↳ Inequality

Creates an area indicating the solution of a linear inequality or an inequality of a function graph, i.e. an inequality of type y <= f(x).

Defined in: composition.js.
Extends JXG.Curve.

Class Summary
Constructor Attributes Constructor Name and Description
 
Display the solution set of a linear inequality (less than or equal to).
Fields borrowed from class JXG.Curve:
dataX, dataY, numberPoints, qdt, ticks
Fields borrowed from class JXG.GeometryElement:
_org_type, _pos, ancestors, baseElement, board, childElements, dash, descendants, draft, dragToTopOfLayer, dump, elementClass, elType, fillColor, fillOpacity, fixed, frozen, gradient, gradientAngle, gradientCX, gradientCY, gradientEndOffset, gradientFR, gradientFX, gradientFY, gradientR, gradientSecondColor, gradientSecondOpacity, gradientStartOffset, hasLabel, highlight, highlighted, highlightFillColor, highlightFillOpacity, highlightStrokeColor, highlightStrokeOpacity, highlightStrokeWidth, id, inherits, isDraggable, isReal, lastDragTime, methodMap, mouseover, name, needsRegularUpdate, needsUpdate, notExistingParents, numTraces, parents, precision, quadraticform, rendNode, scalable, shadow, snapToGrid, stdform, strokeColor, strokeOpacity, strokeWidth, subs, symbolic, trace, traceAttributes, traces, transformations, transitionDuration, type, visible, visProp, visPropCalc, withLabel
Field Summary
Field Attributes Field Name and Description
 
By default an inequality is less (or equal) than.
Fields borrowed from class JXG.Curve:
dataX, dataY, numberPoints, qdt, ticks
Fields borrowed from class JXG.GeometryElement:
_org_type, _pos, ancestors, baseElement, board, childElements, dash, descendants, draft, dragToTopOfLayer, dump, elementClass, elType, fillColor, fillOpacity, fixed, frozen, gradient, gradientAngle, gradientCX, gradientCY, gradientEndOffset, gradientFR, gradientFX, gradientFY, gradientR, gradientSecondColor, gradientSecondOpacity, gradientStartOffset, hasLabel, highlight, highlighted, highlightFillColor, highlightFillOpacity, highlightStrokeColor, highlightStrokeOpacity, highlightStrokeWidth, id, inherits, isDraggable, isReal, lastDragTime, methodMap, mouseover, name, needsRegularUpdate, needsUpdate, notExistingParents, numTraces, parents, precision, quadraticform, rendNode, scalable, shadow, snapToGrid, stdform, strokeColor, strokeOpacity, strokeWidth, subs, symbolic, trace, traceAttributes, traces, transformations, transitionDuration, type, visible, visProp, visPropCalc, withLabel
Methods borrowed from class JXG.Curve:
addTransform, allocatePoints, generateTerm, getTransformationSource, hasPoint, interpolationFunctionFromArray, maxX, minX, moveTo, notifyParents, update, updateCurve, updateDataArray, updateRenderer, updateTransform, X, Y, Z
Methods borrowed from class JXG.GeometryElement:
_set, addChild, addDescendants, addParents, addRotation, addTicks, animate, bounds, clearTrace, cloneToBackground, countChildren, createGradient, createLabel, draggable, fullUpdate, generatePolynomial, getAttribute, getAttributes, getLabelAnchor, getName, getParents, getProperty, getSnapSizes, getTextAnchor, getType, handleSnapToGrid, hide, hideElement, labelColor, noHighlight, normalize, prepareUpdate, remove, removeAllTicks, removeChild, removeDescendants, removeTicks, resolveShortcuts, setArrow, setAttribute, setDash, setDisplayRendNode, setLabel, setLabelText, setName, setParents, setPosition, setPositionDirectly, setProperty, show, showElement, snapToPoints, updateVisibility
Events borrowed from class JXG.GeometryElement:
attribute, attribute:key, down, drag, mousedown, mousedrag, mousemove, mouseout, mouseover, mouseup, move, out, over, pendown, pendrag, penup, touchdown, touchdrag, touchup, up
Class Detail
Inequality(l)
Display the solution set of a linear inequality (less than or equal to). To be precise, the solution set of the inequality y <= b/a * x + c/a is shown. In case a = 0, that is if the equation of the line is bx + c = 0, the area of the inequality bx + c <= 0 is shown.

For function graphs the area below the function graph is filled, i.e. the area of the inequality y <= f(x). With the attribute inverse:true the area of the inequality y >= f(x) is filled.

Parameters:
{JXG.Line} l
The area drawn will be the area below this line. With the attribute inverse:true, the inequality 'greater than or equal to' is shown.


Throws:
{Error}
If the element cannot be constructed with the given parent objects an exception is thrown.
Examples:
var p = board.create('point', [1, 3]),
    q = board.create('point', [-2, -4]),
    l = board.create('line', [p, q]),
    ineq = board.create('inequality', [l]);
ineq = board.create('inequality', [l]);

				
				
// Plot the inequality
//     y >= 2/3 x + 1
// or
//     0 >= -3y + 2x +1
var l = board.create('line', [1, 2, -3]),
    ineq = board.create('inequality', [l], {inverse:true});

				
				
var f = board.create('functiongraph', ['sin(x)', -2*Math.PI, 2*Math.PI]);

var ineq_lower = board.create('inequality', [f]);
var ineq_greater = board.create('inequality', [f], {inverse: true, fillColor: 'yellow'});



				
                
Field Detail
{Boolean} inverse
By default an inequality is less (or equal) than. Set inverse to true will consider the inequality greater (or equal) than.
Defined in: options.js.
Default Value:
false