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

JXG.GeometryElement3D
↳ Line3D

This element is used to provide a constructor for a 3D line.
Defined in: linspace3d.js.
Extends JXG.GeometryElement3D.

Class Summary
Constructor Attributes | Constructor Name and Description
--- | ---
| Line3D(point1,point2, point,direction,range) There are two possibilities to create a Line3D object.

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

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

Class Detail
Line3D(point1,point2, point,direction,range)
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.

Parameters:
{JXG.Point3D|array|function_JXG.Point3D|array|function} point1,point2
  First and second defining point.
{JXG.Point3D|array|function_array|function_array|function} point,direction,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]]);

Documentation generated by JsDoc Toolkit 2.4.0 on Thu Feb 15 2024 17:48:02 GMT+0000 (Coordinated Universal Time)