Interpolation.Circular Linear Curve Method
Definition
Namespace: Numerics.NET
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.0.0
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.0.0
Overload List
| Circular | Creates a piecewise linear interpolating curve for circular/angular data. |
| Circular | Creates a piecewise linear interpolating curve for circular/angular data. |
CircularLinearCurve(Double[], Double[], Boolean)
Creates a piecewise linear interpolating curve for circular/angular data.
public static PiecewiseInterpolatingCurve CircularLinearCurve(
double[] xValues,
double[] angles,
bool degrees = false
)Parameters
- xValues Double[]
- The x-coordinates of the data points. Must be strictly increasing.
- angles Double[]
- The angular y-coordinates of the data points.
- degrees Boolean (Optional)
- If true, angles are in degrees; otherwise, radians.
Return Value
PiecewiseInterpolatingCurveA PiecewiseInterpolatingCurve that interpolates angular data correctly across discontinuities.
Remarks
This method creates a curve that properly handles angular data by unwrapping angles during interpolation and wrapping the output. This prevents interpolation artifacts when angles cross discontinuities (e.g., from 359° to 1° or from π to -π).
Exceptions
| Argument | xValues or angles is null. |
| Dimension | The lengths of xValues and angles do not match. |
| Argument | xValues is not strictly increasing. |
CircularLinearCurve(ReadOnlySpan<Double>, ReadOnlySpan<Double>, Boolean)
Creates a piecewise linear interpolating curve for circular/angular data.
public static PiecewiseInterpolatingCurve CircularLinearCurve(
ReadOnlySpan<double> xValues,
ReadOnlySpan<double> angles,
bool degrees = false
)Parameters
- xValues ReadOnlySpan<Double>
- The x-coordinates of the data points. Must be strictly increasing.
- angles ReadOnlySpan<Double>
- The angular y-coordinates of the data points.
- degrees Boolean (Optional)
- If true, angles are in degrees; otherwise, radians.
Return Value
PiecewiseInterpolatingCurveA PiecewiseInterpolatingCurve that interpolates angular data correctly across discontinuities.
Remarks
This method creates a curve that properly handles angular data by unwrapping angles during interpolation and wrapping the output. This prevents interpolation artifacts when angles cross discontinuities (e.g., from 359° to 1° or from π to -π).
Exceptions
| Dimension | The lengths of xValues and angles do not match. |
| Argument | xValues is not strictly increasing. |