Usage (signatures)
board.create('functiongraph3d', [F, rangeX, rangeY]);
rangeX is the array containing
lower and upper bound for the range of x, rangeY is the array containing
lower and upper bound for the range of y.
Parameters
| Name | Type | Description |
|---|---|---|
F |
function | String | The function F(x,y) returns a number (given as JavaScript function or a JessieCode string) |
rangeX |
Array | function | |
rangeY |
Array | function |
Example
var box = [-5, 5];
var view = board.create('view3d',
[
[-6, -3], [8, 8],
[box, box, box]
],
{
xPlaneRear: {visible: false},
yPlaneRear: {visible: false},
});
// Function F to be plotted
var F = (x, y) => Math.sin(x * y / 4);
// 3D surface
var c = view.create('functiongraph3d', [
F,
box, // () => [-s.Value()*5, s.Value() * 5],
box, // () => [-s.Value()*5, s.Value() * 5],
], {
strokeWidth: 0.5,
stepsU: 70,
stepsV: 70
});
Throws
-
If the element cannot be constructed with the given parent objects an exception is thrown.
- Type
- Exception
Details
- Type
- Object
- Source
- 3d/surface3d.js, line 701