ILNumerics Ultimate VS

SmoothSurface Constructor (InArraySingle, InArraySingle, Boolean, NullableSizeF, NullableSize, UInt32)

ILNumerics Ultimate VS Documentation
ILNumerics - Technical Application Development
Creates a new SmoothSurface plot.

[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 SmoothSurface(
	InArray<float> XYPoints,
	InArray<float> Z,
	bool drawPoints = true,
	Nullable<SizeF> margin = null,
	Nullable<Size> resolution = null,
	uint smoothingFactor = 0
)

Parameters

XYPoints
Type: ILNumericsInArraySingle
Matrix with 2 rows. Each colum stores the X and Y coordinates of a single data point at arbitrary position.
Z
Type: ILNumericsInArraySingle
Z values for all points given in XYPoints. Vector of length XYPoints.S[1].
drawPoints (Optional)
Type: SystemBoolean
[Optional] Whether to mark the original point in the surface. True: show points. Default: true.
margin (Optional)
Type: SystemNullableSizeF
[Optional] Specify the fraction of the overall width / height the resulting surface is extended (by extrapolation) to reach over the minimum / maximum specified points. Default: 0.1 of the specified width / heigth.
resolution (Optional)
Type: SystemNullableSize
[Optional] Number of new data points for the interpolation grid. Default: 150 x 150 points.
smoothingFactor (Optional)
Type: SystemUInt32
[Optional] Averaging factor. Number of neighboring samples to consider when applying an moving average filter in the post processing. Default: 0 (no smoothing).
Remarks

A value of 0.5 for 'Margin.Width' means: SmoothSurface adds half of the actual width (as specified by XYPoints to the left and the right end of the surface width and computes values for this area by extrapolation. Default value is 0.1. The same scheme applies for .Height correspondingly.

If you want the resulting interpolated data to look smoother by decreasing, let's say: peaks coming from measurement errors, there are two options to achieve this:

  • Use fewer interpolated data points. Decrease Resolution to compute fewer points in both directions (width / height).
  • Use the smoothingFactor argument, specifying a higher value. The default value '0' performs no smoothing. Higher values result in more smooth surfaces.
Note, that both control options depend on each other! In order to find an optimal setting it is recommended to ...

1) determine a Resolution which leads to a grid resolution with small enough tiles. In a setup with too small resolution tiles can become too large so that the surface looks 'edgy'. Increase the Resolution parameter (here or later on the created object) until the tiles have a appropriate size.

2) Now find a good SmoothingFactor for the selected resolution. Larger resolution surfaces require a higher value for SmoothingFactor in order to achieve the same smoothness of the result.

[ILNumerics Drawing2 Toolbox]

See Also

Reference