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

JXG.GeometryElement,JXG.GeometryElement3D
↳ JXG.Point3D
↳ Point3D

A Point3D object is defined by three coordinates [x,y,z], or a function returning an array with three numbers. Alternatively, all numbers can also be provided as functions returning a number.
Defined in: point3d.js.
Extends JXG.Point3D.

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

Field Summary
Field Attributes | Field Name and Description
--- | ---
<private> | coords Homogeneous coordinates of a Point3D, i.e.
<private> | slide Optional slide element, i.e.

Method Summary
Method Attributes | Method Name and Description
--- | ---
<private> | F() Function or array of functions or array of numbers defining the coordinates of the point, used in updateCoords.
<private> <static> | Point3D.normalizeCoords() Normalize homogeneous coordinates such the the first coordinate (the w-coordinate is equal to 1 or 0)-
<static> | Point3D.setPosition(coords, noevent) Set the position of a 3D point.
<private> <static> | Point3D.updateCoords() Update the array JXG.Point3D#coords containing the homogeneous coords.
<static> | Point3D.W() Get w-coordinate of a 3D point.
<static> | Point3D.X() Get x-coordinate of a 3D point.
<static> | Point3D.Y() Get y-coordinate of a 3D point.
<static> | Point3D.Z() Get z-coordinate of a 3D point.

Methods borrowed from class JXG.Point3D:
  distance, initCoords, testIfFinite
Methods borrowed from class JXG.GeometryElement:
  _set, addChild, addDescendants, addParents, addParentsFromJCFunctions, addRotation, addTicks, addTransform, animate, bounds, clearTrace, cloneToBackground, countChildren, createGradient, createLabel, draggable, eval, evalVisProp, formatNumberLocale, fullUpdate, generatePolynomial, getAttribute, getAttributes, getLabelAnchor, getName, getParents, getProperty, getSnapSizes, getTextAnchor, getType, handleSnapToGrid, hasPoint, hide, hideElement, noHighlight, normalize, prepareUpdate, remove, removeAllTicks, removeChild, removeDescendants, removeTicks, resolveShortcuts, setArrow, setAttribute, setDash, setDisplayRendNode, setLabel, setLabelText, setName, setParents, setPositionDirectly, setProperty, show, showElement, snapToPoints, update, updateRenderer, 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
Point3D

This element has no direct constructor. To create an instance of this element you have to call JXG.Board#create with type "point3d".
Possible parent array combinations are:
{number|function} x
{number|function} y
{number|function} z
{JXG.GeometryElement3D} [slide=undefined]
  The coordinates are given as x, y, z consisting of numbers or functions. If an optional 3D element "slide" is supplied, the point is a glider on that element.
{array|function} F
{JXG.GeometryElement3D} [slide=null]
  Alternatively, the coordinates can be supplied as
  - function returning an array [x,y,z] of length 3 of numbers or
  - array arr=[x,y,z] of length 3 consisting of numbers
  If an optional 3D element "slide" is supplied, the point is a glider on that element.

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

Examples:

       var bound = [-5, 5];
       var view = board.create('view3d',
           [[-6, -3], [8, 8],
           [bound, bound, bound]],
           {});
       var p = view.create('point3d', [1, 2, 2], { name:'A', size: 5 });
       var q = view.create('point3d', function() { return [p.X(), p.Y(), p.Z() - 3]; }, { name:'B', size: 3, fixed: true });
       var w = view.create('point3d', [ () => p.X() + 3, () => p.Y(), () => p.Z() - 2], { name:'C', size: 3, fixed: true });

        // Glider on sphere
        var view = board.create(
            'view3d',
            [[-6, -3], [8, 8],
            [[-3, 3], [-3, 3], [-3, 3]]],
            {
                depthOrder: {
                    enabled: true
                },
                projection: 'central',
                xPlaneRear: {fillOpacity: 0.2, gradient: null},
                yPlaneRear: {fillOpacity: 0.2, gradient: null},
                zPlaneRear: {fillOpacity: 0.2, gradient: null}
            }
        );

        // Two points
        var center = view.create('point3d', [0, 0, 0], {withLabel: false, size: 2});
        var point = view.create('point3d', [2, 0, 0], {withLabel: false, size: 2});

        // Sphere
        var sphere = view.create('sphere3d', [center, point], {fillOpacity: 0.8});

        // Glider on sphere
        var glide = view.create('point3d', [2, 2, 0, sphere], {withLabel: false, color: 'red', size: 4});
        var l1 = view.create('line3d', [glide, center], { strokeWidth: 2, dash: 2 });

Field Detail
<private> {Array} coords
Homogeneous coordinates of a Point3D, i.e. array of length 4 containing numbers: [w, x, y, z]. Usually, w=1 for finite points and w=0 for points which are infinitely far. If coordinates of the point are supplied as functions, they are resolved in Point3D#updateCoords into numbers.

      p.coords;

<private> {JXG.GeometryElement3D} slide
Optional slide element, i.e. element the Point3D lives on.

      p.slide;

Default Value:
  null

Method Detail
<private> F()
Function or array of functions or array of numbers defining the coordinates of the point, used in updateCoords.

See:
  updateCoords

<private> <static> {Object} Point3D.normalizeCoords()
Normalize homogeneous coordinates such the the first coordinate (the w-coordinate is equal to 1 or 0)-

Returns:
  {Object} Reference to the Point3D object

Examples:

       p.normalizeCoords();

<static> {Object} Point3D.setPosition(coords, noevent)
Set the position of a 3D point.

Parameters:
{Array} coords
  3D coordinates. Either of the form [x,y,z] (Euclidean) or [w,x,y,z] (homogeneous).
{Boolean} noevent Optional
  If true, no events are triggered (TODO)

Returns:
  {Object} Reference to the Point3D object

Examples:

       p.setPosition([1, 3, 4]);

<private> <static> {Object} Point3D.updateCoords()
Update the array JXG.Point3D#coords containing the homogeneous coords.

Returns:
  {Object} Reference to the Point3D object

See:
  GeometryElement3D#update()

Examples:

       p.updateCoords();

<static> Point3D.W()
Get w-coordinate of a 3D point.

Returns:
  Number

Examples:

      p.W();

<static> {Number} Point3D.X()
Get x-coordinate of a 3D point.

Returns:
  {Number}

Examples:

      p.X();

<static> Point3D.Y()
Get y-coordinate of a 3D point.

Returns:
  Number

Examples:

      p.Y();

<static> Point3D.Z()
Get z-coordinate of a 3D point.

Returns:
  Number

Examples:

      p.Z();

Attributes borrowed from other Elements

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, lineCap, 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.Point3D:
  position
Fields borrowed from class JXG.GeometryElement3D:
  element2D, is3D, view
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.Point3D:
  distance, initCoords, testIfFinite
Methods borrowed from class JXG.GeometryElement:
  _set, addChild, addDescendants, addParents, addParentsFromJCFunctions, addRotation, addTicks, addTransform, animate, bounds, clearTrace, cloneToBackground, countChildren, createGradient, createLabel, draggable, eval, evalVisProp, formatNumberLocale, fullUpdate, generatePolynomial, getAttribute, getAttributes, getLabelAnchor, getName, getParents, getProperty, getSnapSizes, getTextAnchor, getType, handleSnapToGrid, hasPoint, hide, hideElement, noHighlight, normalize, prepareUpdate, remove, removeAllTicks, removeChild, removeDescendants, removeTicks, resolveShortcuts, setArrow, setAttribute, setDash, setDisplayRendNode, setLabel, setLabelText, setName, setParents, setPositionDirectly, setProperty, show, showElement, snapToPoints, update, updateRenderer, 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:42 GMT+0200 (Mitteleuropäische Sommerzeit)