Path3FGetParameterFromLength Method |
Namespace: DigitalRune.Mathematics.Interpolation
public float GetParameterFromLength( float length, int maxNumberOfIterations, float tolerance )
Exception | Condition |
---|---|
ArgumentOutOfRangeException | tolerance is negative or 0. |
This method assumes that the spline is length-parameterized; This means: The parameter of a key is equal to the length of the spline at this key. If this is not the case, ParameterizeByLength(Int32, Single) can be called to correct the key parameters automatically.
Normally, the spline curve parameter is not linearly proportional to the length. Therefore, if the point at a given curve length is required, this method can be used to compute the curve parameter which will return the point for the given distance. The result of this method can be used in GetPoint(Single).
This method uses an iterative algorithm. The iterations end when the maxNumberOfIterations were performed, or when the tolerance criterion is met - whichever comes first.