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

Element Comb

JXG.GeometryElement
   ↳ JXG.Curve
         ↳ Comb

A comb to display domains of inequalities.

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

Element Summary
Constructor Attributes Constructor Name and Description
 
Attributes 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.
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
Element Detail
Comb
This element has no direct constructor. To create an instance of this element you have to call JXG.Board#create with type "comb".

Possible parent array combinations are:
{JXG.Point|array|function} point1
{JXG.Point|array|function} 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'
    }
});


				
                
Attribute 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

Attributes borrowed from other Elements
Attributes borrowed from class JXG.Curve:
lineCap
Attributes borrowed from class JXG.GeometryElement:
dash, dashScale, draft, dragToTopOfLayer, fillColor, fillOpacity, fixed, frozen, gradient, gradientAngle, gradientCX, gradientCY, gradientEndOffset, gradientFR, gradientFX, gradientFY, gradientR, gradientSecondColor, gradientSecondOpacity, gradientStartOffset, highlight, highlightFillColor, highlightFillOpacity, highlightStrokeColor, highlightStrokeOpacity, highlightStrokeWidth, isLabel, layer, needsRegularUpdate, precision, priv, rotatable, scalable, shadow, snapToGrid, strokeColor, strokeOpacity, strokeWidth, tabindex, trace, traceAttributes, transitionDuration, transitionProperties, viewport, visible, withLabel

Fields borrowed from other Elements
Fields borrowed from class JXG.Curve:
dataX, dataY, numberPoints, qdt, ticks
Fields borrowed from class JXG.GeometryElement:
_org_type, _pos, ancestors, baseElement, board, childElements, descendants, dump, elementClass, elType, hasLabel, highlighted, id, inherits, isDraggable, isReal, lastDragTime, methodMap, mouseover, name, needsUpdate, notExistingParents, numTraces, parents, quadraticform, rendNode, stdform, subs, symbolic, traces, transformations, type, visProp, visPropCalc

Methods borrowed from other Elements
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 other Elements
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
Documentation generated by JsDoc Toolkit 2.4.0 on Fri Mar 08 2024 12:21:00 GMT+0100 (Mitteleuropäische Normalzeit)