The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information....



Gauss2D


Unit: SDL_math2
Class: none
Declaration: function Gauss2D (PosX, PosY: integer; KWidth, Ampl: double; var Data: TDouble2DArray): integer;

The function Gauss2D generates a Gaussian radius basis function (RBF) and fills the array Data with the corresponding values. The parameters PosX and PosY control the location of the center of the RBF. The parameters KWidth and Ampl control the width and the amplitude of the RBF.

The following figure shows the generated radius basis function using the following parameters:

PosX = 40
PosY = 50
KWidth = 25.0
Ampl = 1.0

The function returns the following error codes:

 0 ... everything is OK
-1 ... the parameter kWIdth must be greater than zero
-2 ... the size of the Data array is too small (minimum size is 2x2 cells)


Last Update: 2023-Feb-06