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

JXG.CoordsElement,JXG.GeometryElement
↳ JXG.Point
↳ Point

This element is used to provide a constructor for a general point. A free point is created if the given parent elements are all numbers and the property fixed is not set or set to false. If one or more parent elements is not a number but a string containing a GEONExT constraint or a function the point will be considered as constrained). That means that the user won't be able to change the point's position directly.
Defined in: point.js.
Extends JXG.Point.

Class Summary
Constructor Attributes | Constructor Name and Description
--- | ---
| Point(z_,x,y, Point,Transformation)

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, lineCap, methodMap, mouseover, name, needsRegularUpdate, needsUpdate, notExistingParents, numTraces, parents, precision, priv, quadraticform, rendNode, rotatable, scalable, shadow, stdform, strokeColor, strokeOpacity, strokeWidth, subs, symbolic, tabindex, trace, traceAttributes, traces, transformations, transitionDuration, transitionProperties, type, viewport, visible, visProp, visPropCalc, withLabel
Fields borrowed from class JXG.CoordsElement:
  coords, groups, isConstrained, needsUpdateFromParent, onPolygon, position, slideObject, slideObjects

Field Summary
Field Attributes | Field Name and Description
--- | ---
| attractorDistance If the distance of the point to one of its attractors is less than this number the point will be a glider on this attracting element.
| attractors List of attractor elements.
| attractorUnit Unit for attractorDistance and snatchDistance, used for magnetized points and for snapToPoints.
| attractToGrid If set to true, the point will only snap to (possibly invisibly) grid points when within Point#attractorDistance of such a grid point.
| face There are different point styles which differ in appearance.
| ignoredSnapToPoints List of elements which are ignored by snapToPoints.
| infoboxDigits Truncating rule for the digits in the infobox.
| showInfobox If true, the infobox is shown on mouse/pen over, if false not.
| size Size of a point, either in pixel or user coordinates.
| sizeUnit Unit for size.
| snapSizeX Defines together with Point#snapSizeY the grid the point snaps on to.
| snapSizeY Defines together with Point#snapSizeX the grid the point snaps on to.
| snapToGrid If set to true, the point will snap to a grid of integer multiples of Point#snapSizeX and Point#snapSizeY (in user coordinates).
| snapToPoints If set to true, the point will snap to the nearest point in distance of Point#attractorDistance.
| snatchDistance If the distance of the point to one of its attractors is at least this number the point will be released from being a glider on the attracting element.
| style This attribute was used to determined the point layout.
| zoom If true, the point size changes on zoom events.

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, lineCap, methodMap, mouseover, name, needsRegularUpdate, needsUpdate, notExistingParents, numTraces, parents, precision, priv, quadraticform, rendNode, rotatable, scalable, shadow, stdform, strokeColor, strokeOpacity, strokeWidth, subs, symbolic, tabindex, trace, traceAttributes, traces, transformations, transitionDuration, transitionProperties, type, viewport, visible, visProp, visPropCalc, withLabel
Fields borrowed from class JXG.CoordsElement:
  coords, groups, isConstrained, needsUpdateFromParent, onPolygon, position, slideObject, slideObjects

Methods borrowed from class JXG.Point:
  hasPoint, isOn, makeIntersection, normalizeFace, setStyle, update, updateRenderer, updateTransform
Methods borrowed from class JXG.GeometryElement:
  _set, addChild, addDescendants, addParents, addParentsFromJCFunctions, addRotation, addTicks, addTransform, 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, updateVisibility, useLocale
Methods borrowed from class JXG.CoordsElement:
  _anim, addAnchor, addConstraint, Coords, Dist, findClosestSnapValue, free, handleAttractors, handleSnapToPoints, makeGlider, moveAlong, moveTo, popSlideObject, setGliderPosition, setPositionByTransform, updateConstraint, updateCoords, updateGlider, updateGliderFromParent, visit, X, XEval, Y, YEval, Z, ZEval

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
Point(z_,x,y, Point,Transformation)

Parameters:
{Number|string|function_Number|string|function_Number|string|function} z_,x,y
  Parent elements can be two or three elements of type number, a string containing a GEONExT constraint, or a function which takes no parameter and returns a number. Every parent element determines one coordinate. If a coordinate is given by a number, the number determines the initial position of a free point. If given by a string or a function that coordinate will be constrained that means the user won't be able to change the point's position directly by mouse because it will be calculated automatically depending on the string or the function's return value. If two parent elements are given the coordinates will be interpreted as 2D affine Euclidean coordinates, if three such parent elements are given they will be interpreted as homogeneous coordinates.
{JXG.Point_JXG.Transformation_Array} Point,Transformation
  A point can also be created providing a transformation or an array of transformations. The resulting point is a clone of the base point transformed by the given Transformation. {@see JXG.Transformation}.

Throws:
{Exception}
  If the element cannot be constructed with the given parent objects an exception is thrown.

See:
  Glider for a non-free point that is attached to another geometric element.

Examples:

    // Create a free point using affine Euclidean coordinates
    var p1 = board.create('point', [3.5, 2.0]);

    // Create a constrained point using anonymous function
    var p2 = board.create('point', [3.5, function () { return p1.X(); }]);

    // Create a point using transformations
    var trans = board.create('transform', [2, 0.5], {type:'scale'});
    var p3 = board.create('point', [p2, trans]);

Field Detail
{Number} attractorDistance
If the distance of the point to one of its attractors is less than this number the point will be a glider on this attracting element. If set to zero nothing happens.
Defined in: options.js.

Default Value:
  0.0

{Array} attractors
List of attractor elements. If the distance of the point is less than attractorDistance the point is made to glider of this element.
Defined in: options.js.

Default Value:
  empty

{String} attractorUnit
Unit for attractorDistance and snatchDistance, used for magnetized points and for snapToPoints. Possible values are 'screen' and 'user'.
Defined in: options.js.

See:
  Point#attractorDistance
  Point#snatchDistance
  Point#snapToPoints
  Point#attractors

Default Value:
  'user'

{Boolean} attractToGrid
If set to true, the point will only snap to (possibly invisibly) grid points when within Point#attractorDistance of such a grid point.

The coordinates of the grid points are either integer multiples of snapSizeX and snapSizeY (given in user coordinates, not pixels) or are the intersection points of the major ticks of the boards default axes in case that snapSizeX, snapSizeY are negative.
Defined in: options.js.

    board.create('point', [3, 3], { attractToGrid: true, attractorDistance: 10, attractorunit: 'screen' });

See:
  Point#attractorDistance
  Point#attractorUnit
  Point#snapToGrid
  Point#snapSizeX
  Point#snapSizeY

Default Value:
  false

{String} face
There are different point styles which differ in appearance. Posssible values are

Value
Input | Output
--- | ---
cross | x
circle | o
square, [] | []
plus | +
minus | -
divide | |
diamond | <>
triangleup | ^, a, A
triangledown | v
triangleleft | <
triangleright | >

Defined in: options.js.

See:
  JXG.Point#setStyle

Default Value:
  circle

{Array} ignoredSnapToPoints
List of elements which are ignored by snapToPoints.
Defined in: options.js.

Default Value:
  empty

{String| Number} infoboxDigits
Truncating rule for the digits in the infobox.

- 'auto': done automatically by JXG.autoDigits()
- 'none': no truncation
- number: truncate after "number digits" with JXG.toFixed()

Defined in: options.js.

See:
  JXG#autoDigits
  JXG#toFixed

Default Value:
  'auto'

{Boolean|String} showInfobox
If true, the infobox is shown on mouse/pen over, if false not. If the value is 'inherit', the value of JXG.Board#showInfobox is taken. true | false | 'inherit'
Defined in: options.js.

See:
  JXG.Board#showInfobox

Default Value:
  true

{Number} size
Size of a point, either in pixel or user coordinates. Means radius resp. half the width of a point (depending on the face).
Defined in: options.js.

See:
  Point#face
  JXG.Point#setStyle
  Point#sizeUnit

Default Value:
  3

{String} sizeUnit
Unit for size. Possible values are 'screen' and 'user.
Defined in: options.js.

See:
  Point#size

Default Value:
  'screen'

{Number} snapSizeX
Defines together with Point#snapSizeY the grid the point snaps on to. It is given in user coordinates, not in pixels. The point will only snap on integer multiples to snapSizeX in x and snapSizeY in y direction. If this value is equal to or less than `0`, it will use the grid displayed by the major ticks of the default ticks of the default x axes of the board.
Defined in: options.js.

See:
  Point#snapToGrid
  Point#snapSizeY
  JXG.Board#defaultAxes

Default Value:
  1

{Number} snapSizeY
Defines together with Point#snapSizeX the grid the point snaps on to. It is given in user coordinates, not in pixels. The point will only snap on integer multiples to snapSizeX in x and snapSizeY in y direction. If this value is equal to or less than `0`, it will use the grid displayed by the major ticks of the default ticks of the default y axes of the board.
Defined in: options.js.

See:
  Point#snapToGrid
  Point#snapSizeX
  JXG.Board#defaultAxes

Default Value:
  1

{Boolean} snapToGrid
If set to true, the point will snap to a grid of integer multiples of Point#snapSizeX and Point#snapSizeY (in user coordinates).

The coordinates of the grid points are either integer multiples of snapSizeX and snapSizeY (given in user coordinates, not pixels) or are the intersection points of the major ticks of the boards default axes in case that snapSizeX, snapSizeY are negative.
Defined in: options.js.

See:
  Point#snapSizeX
  Point#snapSizeY

Default Value:
  false

{Boolean} snapToPoints
If set to true, the point will snap to the nearest point in distance of Point#attractorDistance.
Defined in: options.js.

See:
  Point#attractorDistance

Default Value:
  false

{Number} snatchDistance
If the distance of the point to one of its attractors is at least this number the point will be released from being a glider on the attracting element. If set to zero nothing happens.
Defined in: options.js.

Default Value:
  0.0

{Number} style
This attribute was used to determined the point layout. It was derived from GEONExT and was replaced by Point#face and Point#size.
Defined in: options.js.

See:
  Point#face
  Point#size

Default Value:
  5

{Boolean} zoom
If true, the point size changes on zoom events.
Defined in: options.js.

Default Value:
  false

Documentation generated by JsDoc Toolkit 2.4.0 on Wed Feb 14 2024 15:53:29 GMT+0100 (heure normale d’Europe centrale)