# JSXGraph 1.11.1 Reference

## 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

- Angle
- Arc
- Arrow
- Arrowparallel
- Axes3D
- Axis
- Axis3D
- Bisector
- Bisectorlines
- Boxplot
- Button
- Cardinalspline
- Chart
- Checkbox
- Circle
- Circle3D
- Circumcenter
- Circumcircle
- CircumcircleArc
- CircumcircleSector
- Comb
- Conic
- Curve
- Curve3D
- CurveDifference
- CurveIntersection
- CurveUnion
- Derivative
- Ellipse
- Face3D
- ForeignObject
- Functiongraph
- Functiongraph3D
- Glider
- Grid
- Group
- Hatch
- Hyperbola
- Image
- ImplicitCurve
- Incenter
- Incircle
- Inequality
- Input
- Integral
- Intersection
- IntersectionCircle3D
- IntersectionLine3D
- Label
- Legend
- Line
- Line3D
- MajorArc
- MajorSector
- Measurement
- Mesh3D
- Metapostspline
- Midpoint
- MinorArc
- MinorSector
- MirrorElement
- MirrorPoint
- NonReflexAngle
- Normal
- Orthogonalprojection
- OtherIntersection
- Parabola
- Parallel
- Parallelogram
- Parallelpoint
- ParametricSurface3D
- Perpendicular
- PerpendicularPoint
- PerpendicularSegment
- Plane3D
- Point
- Point3D
- PolarLine
- PolePoint
- Polygon
- Polygon3D
- PolygonalChain
- Polyhedron3D
- RadicalAxis
- Reflection
- ReflexAngle
- RegularPolygon
- Riemannsum
- Sector
- Segment
- Semicircle
- Slider
- Slopefield
- Slopetriangle
- Smartlabel
- Sphere3D
- Spline
- Stepfunction
- Tangent
- TangentTo
- Tapemeasure
- Text
- Text3D
- Ticks
- Ticks3D
- Tracecurve
- Transformation
- Transformation3D
- Turtle
- Vectorfield
- Vectorfield3D
- View3D

Classes

- _global_
- JXG
- JXG.AbstractRenderer
- JXG.Board
- JXG.Board.infobox
- JXG.C
- JXG.CA
- JXG.CanvasRenderer
- JXG.Chart
- JXG.Circle
- JXG.Circle3D
- JXG.Complex
- JXG.Composition
- JXG.Coords
- JXG.CoordsElement
- JXG.Curve
- JXG.Curve3D
- JXG.Dump
- JXG.EventEmitter
- JXG.Expect
- JXG.Face3D
- JXG.ForeignObject
- JXG.GeometryElement
- JXG.GeometryElement3D
- JXG.GeonextParser
- JXG.Group
- JXG.Image
- JXG.JessieCode
- JXG.JSXGraph
- JXG.Legend
- JXG.Line
- JXG.Line3D
- JXG.Math
- JXG.Math.BoxQuadtree
- JXG.Math.Clip
- JXG.Math.Extrapolate
- JXG.Math.Geometry
- JXG.Math.ImplicitPlot
- JXG.Math.IntervalArithmetic
- JXG.Math.Metapost
- JXG.Math.Nlp
- JXG.Math.Numerics
- JXG.Math.Plot
- JXG.Math.Poly
- JXG.Math.Poly.Monomial
- JXG.Math.Poly.Polynomial
- JXG.Math.Poly.Ring
- JXG.Math.ProbFuncs
- JXG.Math.Quadtree
- JXG.Math.Statistics
- JXG.NoRenderer
- JXG.Options
- JXG.Plane3D
- JXG.Point
- JXG.Point3D
- JXG.Polygon
- JXG.Polygon3D
- JXG.PrefixParser
- JXG.Sphere3D
- JXG.Surface3D
- JXG.SVGRenderer
- JXG.Text
- JXG.Text3D
- JXG.Ticks
- JXG.Transformation
- JXG.Turtle
- JXG.Util
- JXG.Util.Base64
- JXG.Util.Unzip
- JXG.Util.UTF8
- JXG.View3D
- JXG.VMLRenderer
- JXG.XML

# Element ImplicitCurve

JXG.GeometryElement
↳ JXG.Curve
↳ ImplicitCurve

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. (Wikipedia)

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.

Element Summary
Constructor Attributes | Constructor Name and Description
--- | ---
| ImplicitCurve

Attributes Summary
Field Attributes | Field Name and Description
--- | ---
| alpha_0 Angle α0 between two successive tangents: determines the smoothness of the curve.
| delta_0 Allowed distance (in user units) of predictor point to curve.
| h_critical If h is below this threshold (in user units), we bail out of the tracing phase of that component.
| h_initial Initial step width (in user units).
| h_max Maximum step width (in user units).
| kappa_0 Inverse of desired number of Newton steps.
| loop_detection Use Gosper's loop detector.
| loop_dir Minimum acos of angle to detect loop.
| loop_dist Allowed distance (in user units multiplied by actual step width) to detect loop.
| margin Defines the margin (in user coordinates) around the JSXGraph board in which the implicit curve is plotted.
| max_steps Maximum iterations for one component of the implicit curve.
| qdt_box Half of the box size (in user units) to search for existing line segments in the quadtree.
| resolution_inner Vertical resolution (in pixel) to search for components of the implicit curve.
| resolution_outer Horizontal resolution: distance (in pixel) between vertical lines to search for components of the implicit curve.
| tol_0 Tolerance to find starting points for the tracing phase of a component.
| tol_cusp Tolerance for cusp / bifurcation detection.
| tol_newton Tolerance for the Newton steps.
| tol_progress If two points are closer than this value, we bail out of the tracing phase for that component.

Field Summary
Field Attributes | Field Name and Description
--- | ---
| domain Defines a domain for searching f(x,y)=0.

Method Summary
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, getLabelPosition, 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, eval, evalVisProp, 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
ImplicitCurve

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
        });
    }

Attribute Detail
alpha_0
Angle α0 between two successive tangents: determines the smoothness of the curve.
Defined in: options.js.

Default Value:
  0.05

delta_0
Allowed distance (in user units) of predictor point to curve.
Defined in: options.js.

Default Value:
  0.05

h_critical
If h is below this threshold (in user units), we bail out of the tracing phase of that component.
Defined in: options.js.

Default Value:
  0.001

h_initial
Initial step width (in user units).
Defined in: options.js.

Default Value:
  0.1

h_max
Maximum step width (in user units).
Defined in: options.js.

Default Value:
  0.5

kappa_0
Inverse of desired number of Newton steps.
Defined in: options.js.

Default Value:
  0.2

loop_detection
Use Gosper's loop detector.
Defined in: options.js.

Default Value:
  true

loop_dir
Minimum acos of angle to detect loop.
Defined in: options.js.

Default Value:
  0.99

loop_dist
Allowed distance (in user units multiplied by actual step width) to detect loop.
Defined in: options.js.

Default Value:
  0.09

margin
Defines the margin (in user coordinates) around the JSXGraph board in which the implicit curve is plotted.
Defined in: options.js.

Default Value:
  1

max_steps
Maximum iterations for one component of the implicit curve.
Defined in: options.js.

Default Value:
  1024

qdt_box
Half of the box size (in user units) to search for existing line segments in the quadtree.
Defined in: options.js.

Default Value:
  0.2

resolution_inner
Vertical resolution (in pixel) to search for components of the implicit curve. A small number increases the running time. For large number components may be missed. Minimum value is 0.01.
Defined in: options.js.

Default Value:
  5

resolution_outer
Horizontal resolution: distance (in pixel) between vertical lines to search for components of the implicit curve. A small number increases the running time. For large number components may be missed. Minimum value is 0.01.
Defined in: options.js.

Default Value:
  5

tol_0
Tolerance to find starting points for the tracing phase of a component.
Defined in: options.js.

Default Value:
  JXG.Math.eps

tol_cusp
Tolerance for cusp / bifurcation detection.
Defined in: options.js.

Default Value:
  0.05

tol_newton
Tolerance for the Newton steps.
Defined in: options.js.

Default Value:
  1.0e-7

tol_progress
If two points are closer than this value, we bail out of the tracing phase for that component.
Defined in: options.js.

Default Value:
  0.0001

Field Detail
domain
Defines a domain for searching f(x,y)=0. Default is null, meaning the bounding box of the board is used. Using domain, visProp.margin is ignored.
Method Detail
{Number} dfx()
Partial derivative in the first variable of the left side of the equation f(x,y)=0. If null, then numerical derivative is used.

Returns:
  {Number}

{Number} dfy()
Partial derivative in the second variable of the left side of the equation f(x,y)=0. If null, then numerical derivative is used.

Returns:
  {Number}

{Number} f()
Function of two variables for the left side of the equation f(x,y)=0.

Returns:
  {Number}

Attributes borrowed from other Elements

Attributes borrowed from class JXG.Curve:
  lineCap
Attributes borrowed from class JXG.GeometryElement:
  aria, cssClass, dash, dashScale, draft, dragToTopOfLayer, element3D, fillColor, fillOpacity, fixed, frozen, gradient, gradientAngle, gradientCX, gradientCY, gradientEndOffset, gradientFR, gradientFX, gradientFY, gradientR, gradientSecondColor, gradientSecondOpacity, gradientStartOffset, highlight, highlightCssClass, highlightFillColor, highlightFillOpacity, highlightStrokeColor, highlightStrokeOpacity, highlightStrokeWidth, isLabel, layer, needsRegularUpdate, nonnegativeOnly, precision, priv, rotatable, scalable, shadow, snapToGrid, strokeColor, strokeOpacity, strokeWidth, tabindex, trace, traceAttributes, transitionDuration, transitionProperties, 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, getLabelPosition, 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, eval, evalVisProp, 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 Apr 04 2025 09:22:40 GMT+0200 (Mitteleuropäische Sommerzeit)