Element ImplicitCurve
JXG.GeometryElement
↳ JXG.Curve
↳ ImplicitCurve
From Wikipedia: "An implicit curve is a plane curve defined by an implicit equation relating two coordinate variables, commonly x and y. For example, the unit circle is defined by the implicit equation x2 + y2 = 1. In general, every implicit curve is defined by an equation of the form f(x, y) = 0 for some function f of two variables."
The partial derivatives for f are optional. If not given, numerical derivatives are used instead. This is good enough for most practical use cases. But if supplied, both partial derivatives must be supplied.
The most effective attributes to tinker with if the implicit curve algorithm fails are
ImplicitCurve#resolution_outer,
ImplicitCurve#resolution_inner,
ImplicitCurve#alpha_0,
ImplicitCurve#h_initial,
ImplicitCurve#h_max, and
ImplicitCurve#qdt_box.
Defined in: curve.js.
Extends
JXG.Curve.
Constructor Attributes | Constructor Name and Description |
---|---|
Field Attributes | Field Name and Description |
---|---|
Angle α0 between two successive tangents: determines the smoothness of
the curve.
|
|
Allowed distance (in user units) of predictor point to curve.
|
|
If h is below this threshold (in user units), we bail out
of the tracing phase of that component.
|
|
Initial step width (in user units).
|
|
Maximum step width (in user units).
|
|
Inverse of desired number of Newton steps.
|
|
Use Gosper's loop detector.
|
|
Minimum acos of angle to detect loop.
|
|
Allowed distance (in user units multiplied by actual step width) to detect loop.
|
|
Defines the margin (in user coordinates) around the JSXGraph board in which the
implicit curve is plotted.
|
|
Maximum iterations for one component of the implicit curve.
|
|
Half of the box size (in user units) to search for existing line segments in the quadtree.
|
|
Vertical resolution (in pixel) to search for components of the implicit curve.
|
|
Horizontal resolution: distance (in pixel) between vertical lines to search for components of the implicit curve.
|
|
Tolerance to find starting points for the tracing phase of a component.
|
|
Tolerance for cusp / bifurcation detection.
|
|
Tolerance for the Newton steps.
|
|
If two points are closer than this value, we bail out of the tracing phase for that
component.
|
Field Attributes | Field Name and Description |
---|---|
Defines a domain for searching f(x,y)=0.
|
Method Attributes | Method Name and Description |
---|---|
dfx()
Partial derivative in the first variable of
the left side of the equation f(x,y)=0.
|
|
dfy()
Partial derivative in the second variable of
the left side of the equation f(x,y)=0.
|
|
f()
Function of two variables for the left side of the equation f(x,y)=0.
|
- 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
-
This element has no direct constructor. To create an instance of this element you have to call JXG.Board#create
with type "implicitcurve".
- Possible parent array combinations are:
-
{Function|String} f
- Function of two variables for the left side of the equation f(x,y)=0. If f is supplied as string, it has to use the variables 'x' and 'y'.
-
{Function|String} dfx
- Optional partial derivative in respect to the first variable If dfx is supplied as string, it has to use the variables 'x' and 'y'.
-
{Function|String} dfy
- Optional partial derivative in respect to the second variable If dfy is supplied as string, it has to use the variables 'x' and 'y'.
-
{Array|Function} rangex
- Optional array of length 2 of the form [x_min, x_max] setting the domain of the x coordinate of the implicit curve. If not supplied, the board's boundingbox (+ the attribute "margin") is taken. For algorithmic reasons, the plotted curve mighty slightly overflow the given domain.
-
{Array|Function} rangey
- Optional array of length 2 of the form [y_min, y_max] setting the domain of the y coordinate of the implicit curve. If not supplied, the board's boundingbox (+ the attribute "margin") is taken. For algorithmic reasons, the plotted curve mighty slightly overflow the given domain.
- Examples:
var f, c; f = (x, y) => 1 / 16 * x ** 2 + y ** 2 - 1; c = board.create('implicitcurve', [f], { strokeWidth: 3, strokeColor: JXG.palette.red, strokeOpacity: 0.8 });
var a, c, f; a = board.create('slider', [[-3, 6], [3, 6], [-3, 1, 3]], { name: 'a', stepWidth: 0.1 }); f = (x, y) => x ** 2 - 2 * x * y - 2 * x + (a.Value() + 1) * y ** 2 + (4 * a.Value() + 2) * y + 4 * a.Value() - 3; c = board.create('implicitcurve', [f], { strokeWidth: 3, strokeColor: JXG.palette.red, strokeOpacity: 0.8, resolution_outer: 20, resolution_inner: 20 });
var c = board.create('implicitcurve', ['abs(x * y) - 3'], { strokeWidth: 3, strokeColor: JXG.palette.red, strokeOpacity: 0.8 });
var niveauline = []; niveauline = [0.5, 1, 1.5, 2]; for (let i = 0; i < niveauline.length; i++) { board.create("implicitcurve", [ (x, y) => x ** .5 * y ** .5 - niveauline[i], [0.25, 3], [0.5, 4] // Domain ], { strokeWidth: 2, strokeColor: JXG.palette.red, strokeOpacity: (1 + i) / niveauline.length, needsRegularUpdate: false }); }
Defined in: options.js.
- Default Value:
- 0.05
Defined in: options.js.
- Default Value:
- 0.05
Defined in: options.js.
- Default Value:
- 0.001
Defined in: options.js.
- Default Value:
- 0.1
Defined in: options.js.
- Default Value:
- 1
Defined in: options.js.
- Default Value:
- 0.2
Defined in: options.js.
- Default Value:
- true
Defined in: options.js.
- Default Value:
- 0.99
Defined in: options.js.
- Default Value:
- 0.09
Defined in: options.js.
- Default Value:
- 1
Defined in: options.js.
- Default Value:
- 1024
Defined in: options.js.
- Default Value:
- 0.2
Defined in: options.js.
- Default Value:
- 5
Defined in: options.js.
- Default Value:
- 5
Defined in: options.js.
- Default Value:
- JXG.Math.eps
Defined in: options.js.
- Default Value:
- 0.05
Defined in: options.js.
- Default Value:
- 1.0e-7
Defined in: options.js.
- Default Value:
- 0.0001
- Returns:
- {Number}
- Returns:
- {Number}
- Returns:
- {Number}
- 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, nonnegativeOnly, precision, priv, rotatable, scalable, shadow, snapToGrid, strokeColor, strokeOpacity, strokeWidth, tabindex, trace, traceAttributes, transitionDuration, transitionProperties, viewport, visible, withLabel
- 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 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