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

Classes

- _global_
- Angle
- Arc
- Arrow
- Arrowparallel
- Axis
- Bisector
- Bisectorlines
- Boxplot
- Button
- Cardinalspline
- Chart
- Checkbox
- Circle
- Circumcenter
- Circumcircle
- CircumcircleArc
- CircumcircleSector
- Comb
- Conic
- Curve
- Curve3D
- CurveDifference
- CurveIntersection
- CurveUnion
- Derivative
- Ellipse
- ForeignObject
- Functiongraph
- Functiongraph3D
- Glider
- Grid
- Group
- Hatch
- Hyperbola
- Image
- ImplicitCurve
- Incenter
- Incircle
- Inequality
- Input
- Integral
- Intersection
- JXG
- JXG.AbstractRenderer
- JXG.Board
- JXG.Board.infobox
- JXG.C
- JXG.CA
- JXG.CanvasRenderer
- JXG.Chart
- JXG.Circle
- JXG.Complex
- JXG.Composition
- JXG.Coords
- JXG.CoordsElement
- JXG.Curve
- JXG.Curve3D
- JXG.Dump
- JXG.EventEmitter
- JXG.Expect
- 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.Math.Symbolic
- JXG.NoRenderer
- JXG.Options
- JXG.Plane3D
- JXG.Point
- JXG.Point3D
- JXG.Polygon
- JXG.PrefixParser
- JXG.Server
- JXG.Server.modules
- JXG.Surface3D
- JXG.SVGRenderer
- JXG.Text
- JXG.Ticks
- JXG.Transformation
- JXG.Turtle
- JXG.Util
- JXG.Util.Base64
- JXG.Util.Unzip
- JXG.Util.UTF8
- JXG.View3D
- JXG.VMLRenderer
- JXG.XML
- Label
- Legend
- Line
- Line3D
- Locus
- MajorArc
- MajorSector
- Measurement
- Metapostspline
- Midpoint
- MinorArc
- MinorSector
- mirrorelement
- Mirrorpoint
- NonReflexAngle
- Normal
- Orthogonalprojection
- OtherIntersection
- Parabola
- Parallel
- Parallelogram
- Parallelpoint
- ParametricSurface3D
- Perpendicular
- PerpendicularPoint
- PerpendicularSegment
- Point
- Point3D
- PolarLine
- PolePoint
- Polygon
- PolygonalChain
- RadicalAxis
- Reflection
- ReflexAngle
- RegularPolygon
- Riemannsum
- Sector
- Segment
- Semicircle
- Slider
- Slopefield
- Slopetriangle
- Smartlabel
- Spline
- Stepfunction
- Tangent
- Tapemeasure
- Text
- Ticks
- Tracecurve
- Transformation
- Turtle
- Vectorfield
- Vectorfield3D
- View3D

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

Class Summary
Constructor Attributes | Constructor Name and Description
--- | ---
| ImplicitCurve(f, dfx, dfy)

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

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

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, 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
ImplicitCurve(f, dfx, dfy)

Parameters:
{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, Default: null
  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, Default: null
  Optional partial derivative in respect to the second variable If dfy is supplied as string, it has to use the variables 'x' and 'y'.

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

Field 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:
  1

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

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}

Documentation generated by JsDoc Toolkit 2.4.0 on Thu Feb 15 2024 17:48:02 GMT+0000 (Coordinated Universal Time)