| BSplineSegment2FFlatten Method |
Computes the points of a sequence of line segments which approximate the curve.
Namespace: DigitalRune.Mathematics.InterpolationAssembly: DigitalRune.Mathematics (in DigitalRune.Mathematics.dll) Version: 1.14.0.0 (1.14.0.14427)
Syntax public void Flatten(
ICollection<Vector2F> points,
int maxNumberOfIterations,
float tolerance
)
Public Sub Flatten (
points As ICollection(Of Vector2F),
maxNumberOfIterations As Integer,
tolerance As Single
)
public:
virtual void Flatten(
ICollection<Vector2F>^ points,
int maxNumberOfIterations,
float tolerance
) sealed
abstract Flatten :
points : ICollection<Vector2F> *
maxNumberOfIterations : int *
tolerance : float32 -> unit
override Flatten :
points : ICollection<Vector2F> *
maxNumberOfIterations : int *
tolerance : float32 -> unit
Parameters
- points
- Type: System.Collections.GenericICollectionVector2F
A collection to which all points of the line segments are added. See remarks.
- maxNumberOfIterations
- Type: SystemInt32
The maximum number of iterations which are taken to compute the approximation.
- tolerance
- Type: SystemSingle
The tolerance value. The absolute error of the approximated polygon will be less than this
tolerance.
Implements
ICurveTParam, TPointFlatten(ICollectionTPoint, Int32, TParam)Exceptions Remarks
This method computes a sequence of line segments which approximates the curve. For each line
segment, the start and end point are added to points. For example, if a
curve is approximated with two line segments (A, B) and (B, C) where A, B, C are three key
points, then following points will be added to collection: A, B, B, C. This means, that
duplicate points are added to the collection. The advantage of this is that the
approximation can represent "gaps" in the curve. And it is easy to flatten several curves
into the same points collection.
For some curves the approximation is computed with an iterative algorithm. The iterations
end when the maxNumberOfIterations were performed, or when the
tolerance criterion is met - whichever comes first.
See Also