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

Element Summary
Constructor Attributes Constructor Name and Description
 
Attributes Summary
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.
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
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'.


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


				
                
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:
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}

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)