Element Point3D
JXG.GeometryElement,JXG.GeometryElement3D
↳ JXG.Point3D
↳ Point3D
This element is used to provide a constructor for a 3D Point.
Defined in: point3d.js.
Extends
JXG.Point3D.
Constructor Attributes | Constructor Name and Description |
---|---|
A Point3D object is defined by 3 coordinates [x,y,z].
|
Field Attributes | Field Name and Description |
---|---|
<private> |
Homogeneous coordinates of a Point3D, i.e.
|
<private> |
Optional slide element, i.e.
|
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 homogeneous coords array.
|
<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, isIllDefined
- 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
A Point3D object is defined by 3 coordinates [x,y,z].
All numbers can also be provided as functions returning a number.
-
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
- The coordinates are given as x, y, z consisting of numbers of functions.
-
{array|function} F
- Alternatively, the coordinates can be supplied as
- array arr=[x,y,z] of length 3 consisting of numbers or
- function returning an array [x,y,z] of length 3 of numbers.
- 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: 5, fixed: true });
Field Detail
<private>
{Array}
coords
Homogeneous coordinates of a Point3D, i.e. array of length 4: [w, x, y, z]. Usually, w=1 for finite points and w=0 for points
which are infinitely far.
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.
- Returns:
- {Object} Reference to the Point3D object
- Examples:
p.setPosition([1, 3, 4]);
<private> <static>
{Object}
Point3D.updateCoords()
Update the homogeneous coords array.
- Returns:
- {Object} Reference to the Point3D object
- Examples:
p.updateCoords();
<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:
- _params
- 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, isIllDefined
- 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