ILNumerics Ultimate VS

SplinePlotUpdate Method

ILNumerics Ultimate VS Documentation
ILNumerics - Technical Application Development
Call this method to update key positions of a recently created SplinePlot object

[ILNumerics Drawing2 Toolbox]

Namespace:  ILNumerics.Drawing.Plotting
Assembly:  ILNumerics.Toolboxes.Drawing2 (in ILNumerics.Toolboxes.Drawing2.dll) Version: 5.5.0.0 (5.5.7503.3146)
Syntax

public override void Update(
	InArray<float> positions
)

Parameters

positions
Type: ILNumericsInArraySingle
[1 x n], [2 x n] or [3 x n] matrix.
Exceptions

ExceptionCondition
ArgumentExceptionIf input argument positions have wrong size or shape, or item is not provided.
Remarks

positions defines points to plot as X,Y,Z in form of matrix with size [3 x m]. Where m is the number of defined points.

More than 4 points must be defined for the spline function calculation. Otherwise, use LinePlot instead.

The same resolution factor set in the constructor will be used.

If the intput parameter positions contains NaN values, they will be removed. Only if the input parameter positions is one dimensional, the NaN values will be replaced. In order to replace the NaN values, the number of grid points must be greater than 3 after the removal of the NaN values.

[ILNumerics Drawing2 Toolbox]

Examples

Creates and plots a smooth SplinePlot through 7 random data points. Use this example in a Windows Forms Application project.

 private void ilPanel1_Load(object sender, EventArgs e) {
    // define a function in 3D space
    Array<float> Points = tosingle(rand(3, 7));         

    // setup the plot cube ...
     var pc = ilPanel1.Scene.Add(new PlotCube(twoDMode: false));

    // plot smooth Spline plot with resolution 2
     var mySplinePlot = pc.Add(new SplinePlot(Points, lineColor: Color.Red, markerStyle: MarkerStyle.Dot, resolution:2));

     // change spline resolution and update plot using new points
     Points = tosingle(rand(3, 15));
     mySplinePlot.Update(Points);
     mySplinePlot.Resolution = 20;

}
See Also

Reference