Menu - Top - Home - Donate to Me

module:extras/contourlines

Back to documentation index.

module:extras/contourlines()

The extras/contourlines.js module. To import all symbols in this module, either of the following can be used:

import * from "extras/contourlines.js";
// -- or --
import * as CustomModuleName from "extras/contourlines.js";

Methods

(static) module:extras/contourlines.contourLines(func, levels, u1, u2, v1, v2, usize, vsize)

Generates contour lines for two-dimensional data.

Parameters

Return Value

A mesh buffer of line segments for the contour lines. (Type: MeshBuffer)

Examples

This example generates contour lines for a simple function. This method samples the function at integer grid points.

var mesh=contourLines((u,v)=>(Math.sin((u+v)/6)),
[0, 1, 2, 3],
0,10,0,10,10,10);

(static) module:extras/contourlines.contourLines3D(mesh, planes)

Generates a mesh buffer of contour lines along the surface of a 3-dimensional triangle mesh.

Parameters

Return Value

A mesh buffer containing the generated contour lines. Returns null if the input mesh's primitive type isn't triangles, or if the input mesh doesn't contain a "POSITION" buffer attribute with three elements per value. (Type: MeshBuffer)

Back to documentation index.