Drawing3d documented Class Library

Utils.Bernstein Method

Calculates the Bernstein coefficient of degree and index id at the value t. This is used for the calculation of Bezierfunction and Meshes

[Visual Basic]
Public Shared Sub Bernstein( _
   ByVal deg As Integer, _
   ByVal id As Integer, _
   ByVal t As Double _
)
[C#]
public static double Bernstein(
   int deg,
   int id,
   double t
);

Parameters

deg
degree if the Bernstein coefficient
id
index of the Bernstein coefficient
t
Parameter

Return Value

value of the Bernstein coefficient

Example

if A, B, C, D are Points of type xy respectivly xyz then b(t) = A * Bernstein(3, 0) + B * Bernstein(3, 1) + C*Bernstein(3, 2) + D * Bernstein(3, 3) results the interpolated Beziervalue of degree 3. "*" means a multiplication between a Point ( xy or xyz ) and a double value.

See Also

Utils Class | Drawing3d.Math Namespace