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 Comb

JXG.GeometryElement
   ↳ JXG.Curve
         ↳ Comb

A comb to display domains of inequalities.

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

Class Summary
Constructor Attributes Constructor Name and Description
 
Comb(point1,point2)
Fields borrowed from class JXG.Curve:
dataX, dataY, lineCap, numberPoints, qdt, ticks
Fields borrowed from class JXG.GeometryElement:
_org_type, _pos, ancestors, baseElement, board, childElements, dash, dashScale, 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, isLabel, isReal, lastDragTime, layer, methodMap, mouseover, name, needsRegularUpdate, needsUpdate, notExistingParents, numTraces, parents, precision, priv, quadraticform, rendNode, rotatable, scalable, shadow, snapToGrid, stdform, strokeColor, strokeOpacity, strokeWidth, subs, symbolic, tabindex, trace, traceAttributes, traces, transformations, transitionDuration, transitionProperties, type, viewport, visible, visProp, visPropCalc, withLabel
Field Summary
Field Attributes Field Name and Description
 
Angle - given in radians - under which comb elements are positioned.
 
Frequency of comb elements.
 
Attributes for first defining point of the comb.
 
Attributes for second defining point of the comb.
 
Should the comb go right to left instead of left to right.
 
Width of the comb.
Fields borrowed from class JXG.Curve:
dataX, dataY, lineCap, numberPoints, qdt, ticks
Fields borrowed from class JXG.GeometryElement:
_org_type, _pos, ancestors, baseElement, board, childElements, dash, dashScale, 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, isLabel, isReal, lastDragTime, layer, methodMap, mouseover, name, needsRegularUpdate, needsUpdate, notExistingParents, numTraces, parents, precision, priv, quadraticform, rendNode, rotatable, scalable, shadow, snapToGrid, stdform, strokeColor, strokeOpacity, strokeWidth, subs, symbolic, tabindex, trace, traceAttributes, traces, transformations, transitionDuration, transitionProperties, type, viewport, 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, addParentsFromJCFunctions, addRotation, addTicks, animate, bounds, clearTrace, cloneToBackground, countChildren, createGradient, createLabel, draggable, formatNumberLocale, fullUpdate, generatePolynomial, getAttribute, getAttributes, getLabelAnchor, getName, getParents, getProperty, getSnapSizes, getTextAnchor, getType, handleSnapToGrid, hide, hideElement, noHighlight, normalize, prepareUpdate, remove, removeAllTicks, removeChild, removeDescendants, removeTicks, resolveShortcuts, setArrow, setAttribute, setDash, setDisplayRendNode, setLabel, setLabelText, setName, setParents, setPosition, setPositionDirectly, setProperty, show, showElement, snapToPoints, updateVisibility, useLocale
Events borrowed from class JXG.GeometryElement:
attribute, attribute:key, down, drag, keydrag, mousedown, mousedrag, mousemove, mouseout, mouseover, mouseup, move, out, over, pendown, pendrag, penup, touchdown, touchdrag, touchup, up
Class Detail
Comb(point1,point2)
Parameters:
{JXG.Point|array|function_JXG.Point|array|function} point1,point2
Parent elements can be two elements either of type JXG.Point or array of numbers describing the coordinates of a point. In the latter case the point will be constructed automatically as a fixed invisible point. It is possible to provide a function returning an array or a point, instead of providing an array or a point.


Throws:
{Error}
If the element cannot be constructed with the given parent objects an exception is thrown. Parameter options:
Examples:
// Create a simple horizontal comb with invisible endpoints
var c = board.create('comb', [[1, 0], [3, 0]]);


				
				
var p1 = board.create('glider', [-3, 0, board.defaultAxes.x]);
var p2 = board.create('glider', [-1, 0, board.defaultAxes.x]);
var c1 = board.create('comb', [p1, p2], {width: 0.2, frequency: 0.1, angle: Math.PI / 4});


				
				
var s = board.create('slider', [[1,3], [4,3], [0.1, 0.3, 0.8]]);
var p1 = board.create('glider', [-3, 0, board.defaultAxes.x]);
var p2 = board.create('glider', [-1, 0, board.defaultAxes.x]);
var c1 = board.create('comb', [p1, p2], {
    width: function(){ return 4*s.Value(); },
    reverse: function(){ return (s.Value()<0.5) ? false : true; },
    frequency: function(){ return s.Value(); },
    angle: function(){ return s.Value() * Math.PI / 2; },
    curve: {
        strokeColor: 'red'
    }
});


				
                
Field Detail
{Number} angle
Angle - given in radians - under which comb elements are positioned.
Defined in: options.js.
Default Value:
Math.PI / 3 (i.e. π /3 or 60^° degrees)

{Number} frequency
Frequency of comb elements.
Defined in: options.js.
Default Value:
0.2

{Point} point1
Attributes for first defining point of the comb.
Defined in: options.js.

{Point} point2
Attributes for second defining point of the comb.
Defined in: options.js.

{Boolean} reverse
Should the comb go right to left instead of left to right.
Defined in: options.js.
Default Value:
false

{Number} width
Width of the comb.
Defined in: options.js.
Default Value:
0.4

Documentation generated by JsDoc Toolkit 2.4.0 on Wed Feb 14 2024 15:53:28 GMT+0100 (heure normale d’Europe centrale)