Menu - Top - Home - Donate to Me


Back to documentation index.

H3DU.CurveTube(func, [thickness], [sweptCurve])

A surface evaluator object for a tube extruded from a parametric curve.

This class is considered a supplementary class to the Public Domain HTML 3D Library and is not considered part of that library.

To use this class, you must include the script "extras/curvetube.js"; the class is not included in the "h3du_min.js" file which makes up the HTML 3D Library. Example:

<script type="text/javascript" src="extras/curvetube.js"></script>




Returns the starting and ending U and V coordinates of this surface.

Return Value

A four-element array. The first and second elements are the starting and ending U coordinates, respectively, of the surface, and the third and fourth elements are its starting and ending V coordinates. The starting and ending U coordinates will be the extruded curve's end points (or [0, 1] if it doesn't implement an endPoints method). The starting and ending V coordinates are [0, π] by default, but if a cross section curve is defined, those V coordinates will be that curve's end points (or [0, 1] if it doesn't implement an endPoints method).

H3DU.CurveTube#evaluate(u, v)

Generates a point on the extruded tube from the given u and V coordinates.


Return Value

A 3-element array specifying a 3D point. (Type: Array.<number>)

Back to documentation index.