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 Sphere3D

JXG.GeometryElement,JXG.GeometryElement3D
   ↳ JXG.Sphere3D
         ↳ Sphere3D

This element is used to provide a constructor for a sphere.

Defined in: sphere3d.js.
Extends JXG.Sphere3D.

Element Summary
Constructor Attributes Constructor Name and Description
 
A sphere consists of all points with a given distance from a given point.
Methods borrowed from class JXG.Sphere3D:
Radius, setRadius
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, hasPoint, 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, 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
Sphere3D
A sphere consists of all points with a given distance from a given point. The given point is called the center, and the given distance is called the radius. A sphere can be constructed by providing a center and a point on the sphere or a center and a radius (given as a number or function). If the radius is a negative value, its absolute value is taken.
This element has no direct constructor. To create an instance of this element you have to call JXG.Board#create with type "sphere3d".

Possible parent array combinations are:
{JXG.Point3D} center
{number|JXG.Point3D} radius

The center must be given as a JXG.Point3D (see JXG.providePoints3D), but the radius can be given as a number (which will create a sphere with a fixed radius) or another JXG.Point3D.

If the radius is supplied as number or the output of a function, its absolute value is taken.



Throws:
{Exception}
If the element cannot be constructed with the given parent objects an exception is thrown.
Examples:
var view = board.create(
    'view3d',
    [[-6, -3], [8, 8],
    [[0, 3], [0, 3], [0, 3]]],
    {
        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',
    [1.5, 1.5, 1.5],
    {
        withLabel: false,
        size: 5,
   }
);
var point = view.create(
    'point3d',
    [2, 1.5, 1.5],
    {
        withLabel: false,
        size: 5
   }
);

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


				
                

Attributes borrowed from other Elements
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, lineCap, needsRegularUpdate, nonnegativeOnly, 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.Sphere3D:
aux2D, center, element2D, method, point2, projectionType
Fields borrowed from class JXG.GeometryElement3D:
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.Sphere3D:
Radius, setRadius
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, hasPoint, 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, 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 Wed Oct 23 2024 15:44:16 GMT+0200 (Mitteleuropäische Sommerzeit)