Assembly: DigitalRune.Mathematics (in DigitalRune.Mathematics.dll) Version: 1.7.0.0 (1.7.0.9486)
Syntax
| C# |
|---|
public class HermiteSegment1F : ICurve<float, float>, IRecyclable |
| Visual Basic |
|---|
Public Class HermiteSegment1F _ Implements ICurve(Of Single, Single), _ IRecyclable |
| Visual C++ |
|---|
public ref class HermiteSegment1F : ICurve<float, float>, IRecyclable |
Remarks
A HermiteSegment1F can be used to smoothly interpolate between two points.
The curve runs through the points Point1 and Point2. The tangents at these points can be controlled with Tangent1 and Tangent2. The curve smoothly interpolates between Point1 and Point2.
Multiple splines can be patched together by matching the tangents at the control points.
The curve function point = C(parameter) takes a scalar parameter and returns a point on the curve (see GetPoint(Single)). The curve parameter lies in the interval [0,1]; it is also known as interpolation parameter, interpolation factor or weight of the target point. C(0) returns the start point Point1; C(1) returns the end point Point2.
The curve is defined as:
C(u) = (2u3 - 3u2 + 1) p1 + (u3 - 2u2 + u) t1 + (-2u3 + 3u2) p2 + (u3 - u2) t2,
where u is the interpolation parameter, p are the start/end points and t are the start/end tangents.