Usage (signatures)
board.create('curve3d', [FX, FY, FZ, range]);
FX(u), FY(u), FZ(u) are functions returning a number, range is the array containing lower and upper bound for the range of the parameter u. range may also be a function returning an array of length two.
Parameters
| Name | Type | Description |
|---|---|---|
FX |
function | |
FY |
function | |
FZ |
function | |
range |
Array | function |
Example
Create a simple curve in 3D
var bound = [-1.5, 1.5];
var view=board.create('view3d',
[[-4, -4],[8, 8],
[bound, bound, bound]],
{});
var curve = view.create('curve3d', [(u)=>Math.cos(u), (u)=>Math.sin(u), (u)=>(u/Math.PI)-1,[0,2*Math.PI] ]);
board.create('curve3d', [FZ, range]);
F[X,Y,Z](u) a function returning an array [x,y,z] of numbers, range as above.
Parameters
| Name | Type | Description |
|---|---|---|
FZ |
function | |
range |
Array | function |
board.create('curve3d', [X, Y, Z]);
Three arrays containing the coordinate points which define the curve.
Parameters
| Name | Type | Description |
|---|---|---|
X |
Array | |
Y |
Array | |
Z |
Array |
Throws
-
If the element cannot be constructed with the given parent objects an exception is thrown.
- Type
- Exception
Details
- Type
- Object
- Source
- 3d/curve3d.js, line 355