Plane3D

Element

A 3D plane is defined either by a point and two linearly independent vectors, or by three points.

A 3D plane is defined either by a point and two linearly independent vectors, or by three points. In the first case, the parameters are a 3D point (or a coordinate array) and two vectors (arrays). In the second case, the parameters consist of three 3D points (given as points or coordinate arrays). In order to distinguish the two cases, in the latter case (three points), the additional attribute Plane3D#threePoints has to be supplied if both, the second point and the third point, are given as arrays or functions. Otherwise, it would not be clear if the input arrays have to be interpreted as points or directions.

All coordinate arrays can be supplied as functions returning a coordinate array.

Usage (signatures)
board.create('plane3d', [point, direction1, direction2, range1, range2]);
Parameters
Name Type Description
point Point3DLike
direction1 Line3D | Array | function
direction2 Line3D | Array | function
range1 Array | function

Array of length 2, elements can also be functions. Use [-Infinity, Infinity] for infinite lines.

range2 Array | function

Array of length 2, elements can also be functions. Use [-Infinity, Infinity] for infinite lines.

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

 var A = view.create('point3d', [-2, 0, 1], {size: 2});

 // Infinite Plane by point and two directions
 var plane = view.create('plane3d', [A, [1, 0, 0], [0, 1, 0], [-Infinity, Infinity], [-Infinity, Infinity]]);

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

 var A = view.create('point3d', [-2, 0, 1], {size: 2});

 // Finite Plane by point and two directions
 var plane1 = view.create('plane3d', [A, [1, 0, 0], [0, 1, 0], [-2, 2], [-2, 2]]);
 var plane2 = view.create('plane3d', [[0, 0, -1], [1, 0, 0], [0, 1, 0], [-2, 2], [-2, 2]], {
     mesh3d: { visible: true },
     point: {visible: true, name: "B", fixed: false}
 });

var view = board.create(
     'view3d',
     [[-6, -3], [8, 8],
     [[-3, 3], [-3, 3], [-3, 3]]],
     {
         depthOrder: {
             enabled: true
         },
         projection: 'central',
         xPlaneRear: { visible: false, fillOpacity: 0.2 },
         yPlaneRear: { visible: false, fillOpacity: 0.2 },
         zPlaneRear: { fillOpacity: 0.2 }
     }
 );

 var A = view.create('point3d', [-2, 0, 1], { size: 2 });

 var line1 = view.create('line3d', [A, [0, 0, 1], [-Infinity, Infinity]], { strokeColor: 'blue' });
 var line2 = view.create('line3d', [A, [1, 1, 0], [-Infinity, Infinity]], { strokeColor: 'blue' });

 // Plane by point and two lines
 var plane2 = view.create('plane3d', [A, line1, line2], {
     fillColor: 'blue'
 });

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

 var A = view.create('point3d', [-2, 0, 1], {size: 2});

 // Infinite Plane by two directions,
 // range1 = range2 = [-Infinity, Infinity]
 var plane1 = view.create('plane3d', [A, [1, 0, 0], [0, 1, 0]], {
     fillColor: 'blue',
 });

 // Infinite Plane by three points,
 var plane2 = view.create('plane3d', [A, [1, 0, 0], [0, 1, 0]], {
     threePoints: true,
     fillColor: 'red',
     point2: {visible: true},
     point3: {visible: true}
 });

board.create('plane3d', [point1, point2, point3]);

The plane is defined by three points.

Parameters
Name Type Description
point1 Point3DLike
point2 Point3DLike
point3 Point3DLike
Example
var view = board.create(
     'view3d',
     [[-6, -3], [8, 8],
     [[-3, 3], [-3, 3], [-3, 3]]],
     {
         depthOrder: {
             enabled: true
         },
         projection: 'central',
         xPlaneRear: {fillOpacity: 0.2},
         yPlaneRear: {fillOpacity: 0.2},
         zPlaneRear: {fillOpacity: 0.2}
     }
 );

 var A = view.create('point3d', [0, 0, 1], {size: 2});
 var B = view.create('point3d', [2, 2, 1], {size: 2});
 var C = view.create('point3d', [-2, 0, 1], {size: 2});

 // Plane by three points
 var plane = view.create('plane3d', [A, B, C], {
     fillColor: 'blue'
 });

Attributes

Own

mesh3d

Description

Optional 3D mesh of a finite plane. It is not available if the plane is infinite (at initialization time) in any direction.

Type
Mesh3D
Default Value
see Mesh3D
Source
options3d.js, line 975

point

Description

Attributes of the defining point in case the plane is defined by [point, direction1, direction2, [range1, [range2]]].

Type
Point3D
Default Value
{visible: false, name: "", fixed: true}
Source
options3d.js, line 1031

point1

Description

Attributes of the first point in case the plane is defined by [point, point, point].

Type
Point3D
Default Value
{visible: false, name: ""}
Source
options3d.js, line 1040

point2

Description

Attributes of the second point in case the plane is defined by [point, point, point].

Type
Point3D
Default Value
{visible: false, name: ""}
Source
options3d.js, line 1049

point3

Description

Attributes of the third point in case the plane is defined by [point, point, point].

Type
Point3D
Default Value
{visible: false, name: ""}
Source
options3d.js, line 1058

threePoints

Description

If the second parameter and the third parameter are given as arrays or functions and threePoints:true then the second and third parameter are interpreted as point coordinates and not as directions, i.e. the plane is defined by three points.

Type
Boolean
Default Value
false
Source
options3d.js, line 1019

Inherited

Members

Own

(private) d : Array

Description

Right hand side of the Hesse normal form.

Type
Array
See
Source
3d/linspace3d.js, line 916

direction1 : Array|function

Description

Two linearly independent vectors - together with a point - define the plane. Each of these direction vectors is an array of numbers or functions (either of length 3 or 4) or function returning array of length 3 or 4. Homogeneous coordinates of directions have the form [0, x, y, z].

Type
Array | function
See
Source
3d/linspace3d.js, line 829

direction2 : Array|function

Description

Two linearly independent vectors - together with a point - define the plane. Each of these direction vectors is an array of numbers or functions (either of length 3 or 4) or function returning array of length 3 or 4. Homogeneous coordinates of directions have the form [0, x, y, z].

Type
Array | function
See
Source
3d/linspace3d.js, line 842

(private) mesh3d : Mesh3D

Description

Mesh (grid) element of the plane.

Type
Mesh3D
Source
3d/linspace3d.js, line 896

(private) normal : Array

Description

Normal vector of the plane. Left hand side of the Hesse normal form.

Type
Array
See
Source
3d/linspace3d.js, line 905

range_u : Array

Description

Range [r1, r2] of direction1. The 3D line goes from (point + r1 * direction1) to (point + r2 * direction1)

Type
Array
Default Value
[-Infinity, Infinity]
Source
3d/linspace3d.js, line 854

range_v : Array

Description

Range [r1, r2] of direction2. The 3D line goes from (point + r1 * direction2) to (point + r2 * direction2)

Type
Array
Default Value
[-Infinity, Infinity]
Source
3d/linspace3d.js, line 863

(private) vec1 : Array

Description

Spanning vector 1 of the 3D plane. Contains the evaluated coordinates from direction1 and range1. and is of length 4, the first entry being 0, i.e. homogenous coordinates.

Type
Array
See
Source
3d/linspace3d.js, line 872

(private) vec2 : Array

Description

Spanning vector 2 of the 3D plane. Contains the evaluated coordinates from Plane3D#direction2 and Plane3D#range2 and is of length 4, the first entry being 0, i.e. homogenous coordinates.

Type
Array
See
Source
3d/linspace3d.js, line 884

(static) point : JXG.Point3D

Description

3D point which - together with two direction vectors - defines the plane.

Type
JXG.Point3D
See
Source
3d/linspace3d.js, line 817

Inherited

Methods

Own

F(u, v)

Get coordinate array [1, x, y, z] of a point on the plane for parameters (u, v).

Parameters

Name Type Description
u Number
v Number

Returns

Array of length 3.

Details

Source
3d/linspace3d.js, line 942

X(u, v)

Get x-coordinate of a point on the plane for parameters (u, v).

Parameters

Name Type Description
u Number
v Number

Returns

Number

Details

Source
3d/linspace3d.js, line 971

Y(u, v)

Get y-coordinate of a point on the plane for parameters (u, v).

Parameters

Name Type Description
u Number
v Number

Returns

Number

Details

Source
3d/linspace3d.js, line 984

Z(u, v)

Get z-coordinate of a point on the plane for parameters (u, v).

Parameters

Name Type Description
u Number
v Number

Returns

Number

Details

Source
3d/linspace3d.js, line 997

(private) updateCoords() → {Object}

Update the arrays JXG.Plane3D#vec1 and JXG.Plane3D#vec1 containing the homogeneous coords of the spanning vectors.

Returns

Reference to Plane3D object

Type
Object

Details

Source
3d/linspace3d.js, line 1010

(private) updateNormal() → {Object}

Update the Hesse normal form of the plane, i.e. update normal vector and right hand side. Updates also vec1 and vec2.

Example

plane.updateNormal();

Returns

Reference to the Plane3D object

Type
Object

Details

Source
3d/linspace3d.js, line 1060

Inherited

Events

Own

none

Inherited

Throws

If the element cannot be constructed with the given parent objects an exception is thrown.

Type
Exception

Details

Type
JXG.Plane3D
Source
3d/linspace3d.js, line 1352

Extends