Menu - Top - Home - Donate to Me

H3DU.BezierSurface

Back to documentation index.

H3DU.BezierSurface(cp, [u1], [u2], [v1], [v2])

Augments: H3DU.Surface

Deprecated: Instead of this class, use H3DU.BSplineSurface.fromBezierSurface to create a Bézier surface.

A surface evaluator object for a Bézier surface.

Parameters

Methods

H3DU.BezierSurface#bitangent(u, v)

Finds an approximate bitangent vector of this surface at the given U and V coordinates.

The implementation in H3DU.Surface calls the evaluator's bitangent method if it implements it; otherwise, does a numerical differentiation with respect to the V axis using the evaluate method.

The bitangent vector is the vector pointing in the direction of the V axis, or alternatively, the partial derivative of the evaluate method with respect to v. The bitangent vector returned by this method should not be "normalized" to a unit vector.

Parameters

Return Value

An array describing a bitangent vector. It should have at least as many elements as the number of dimensions of the underlying surface. (Type: Array.<number>)

H3DU.BezierSurface#endPoints()

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. (Type: Array.<number>)

H3DU.BezierSurface#evaluate(u, v)

Evaluates the surface function based on a point in a Bézier surface.

Parameters

Return Value

An array of the result of the evaluation. It will have as many elements as a control point, as specified in the constructor. (Type: Array.<number>)

H3DU.BezierSurface#gradient(u, v)

Finds an approximate gradient vector of this surface at the given U and V coordinates.

The implementation in H3DU.Surface calls the evaluator's gradient method if it implements it; otherwise uses the surface's tangent and bitangent vectors to implement the gradient (however, this approach is generally only meaningful for a three-dimensional surface).

The gradient is a vector pointing up and away from the surface. If the evaluator describes a regular three-dimensional surface (usually a continuous, unbroken surface such as a sphere, an open cylinder, or a disk rotated in three dimensions), this can be the cross product of the tangent vector and bitangent vector, in that order. The gradient returned by this method should not be "normalized" to a unit vector.

Parameters

Return Value

An array describing a gradient vector. It should have at least as many elements as the number of dimensions of the underlying surface. (Type: Array.<number>)

H3DU.BezierSurface#normal(u, v)

Convenience method for finding an approximate normal vector of this surface at the given U and V coordinates. The normal vector is the same as the gradient vector, but "normalized" to a unit vector.

Parameters

Return Value

An array describing a normal vector. It should have at least as many elements as the number of dimensions of the underlying surface. (Type: Array.<number>)

H3DU.BezierSurface#tangent(u, v)

Finds an approximate tangent vector of this surface at the given U and V coordinates. The implementation in H3DU.Surface calls the evaluator's tangent method if it implements it; otherwise, does a numerical differentiation with respect to the U axis using the evaluate method.

The tangent vector is the vector pointing in the direction of the U axis, or alternatively, the partial derivative of the evaluate method with respect to u. The tangent vector returned by this method should not be "normalized" to a unit vector.

Parameters

Return Value

An array describing a tangent vector. It should have at least as many elements as the number of dimensions of the underlying surface. (Type: Array.<number>)

Back to documentation index.