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 Line3D

JXG.GeometryElement3D
      ↳ Line3D

This element is used to provide a constructor for a 3D line.

Defined in: linspace3d.js.
Extends JXG.GeometryElement3D.

Element Summary
Constructor Attributes Constructor Name and Description
 
There are two possibilities to create a Line3D object.
Element Detail
Line3D
There are two possibilities to create a Line3D object.

First: the line in 3D is defined by two points in 3D (Point3D). The points can be either existing points or coordinate arrays of the form [x, y, z].

Second: the line in 3D is defined by a point (or coordinate array [x, y, z]) a direction given as array [x, y, z] and an optional range given as array [s, e]. The default value for the range is [-Infinity, Infinity].

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

Possible parent array combinations are:
{JXG.Point3D|array|function} point1
{JXG.Point3D|array|function} point2

First and second defining point.


{JXG.Point3D|array|function} point
{array|function} direction
{array|function} range

Alternatively, point, direction and range can be supplied.
  • point: Point3D or array of length 3
  • direction: array of length 3 or function returning an array of numbers or function returning an array
  • range: array of length 2, elements can also be functions.


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 });
    // Lines through 2 points
    var l1 = view.create('line3d', [[1, 3, 3], [-3, -3, -3]], {point1: {visible: true}, point2: {visible: true} });
    var l2 = view.create('line3d', [p, l1.point1]);

    // Line by point, direction, range
    var l3 = view.create('line3d', [p, [0, 0, 1], [-2, 4]]);


				
                

Attributes borrowed from other Elements

Fields borrowed from other Elements
Fields borrowed from class JXG.GeometryElement3D:
element2D, is3D, view

Methods borrowed from other Elements

Events borrowed from other Elements
Documentation generated by JsDoc Toolkit 2.4.0 on Fri Nov 08 2024 12:13:06 GMT+0100 (Mitteleuropäische Normalzeit)