NAME

boxPntGen -- generates mesh pnts or uniform random dot points

PROTOTYPE

unitptr boxPntGen(int iDim, int aiPnt[], char* tOpt, unitptr host)

ARGUMENTS

int iDim
dim of output vector
int aiPnt[]
points per dimension
char* tOpt
option, recognizes CHEBYSHEVSPACING
unitptr host
host unit

DESCRIPTION:

creates a unit for generating iDim dimensional mesh data points. The rectangular mesh volume is specified by center and range of each component i. aiPnt[i] nodes are placed with equidistant spacing, or, if "-chebyshevSpacing" is given in the tOpt string, the knots are spaced according to the zeros in the Chebyshev polynomials. Uniform random noise can be added using X(u,2,1) where the number is relative to the inter node spacing (1 means the output is drawn from sub-volumes covering (more than) the mesh volume with no overlap). The same unit produces randomly distributed data (no sequence) from within the mesh volume if the product of aiPnt[*] is zero.

INTERFACE OF CREATED UNIT:

X_in[iDim]:
(input field 0) mesh center
Y_in[iDim]:
(input field 1) mesh range (max-min)
CTL_in[2]:
(input field 2) Pin 0: control unit (1=ON, 0=OFF). Pin 1: random noise added to mesh data output.
X_out[1]:
(output field 0) mesh data output tuple
Y_out[n]:
(output field 1) Pin 0: counter (0... totalNumNodes-1). Pin 1: split mark. Pin 2: totalNumNodes = Prod aiPnt[]

EXECUTION:

output the next mesh data point. The lowest dimensions runs fastest. The split output pin is positive, if a row within the multi-dimensional mesh is completed (i.e. it return the number of completed rows). This can be utilised to print newlines to parametric 3D gnuplot files.

CONTROL:

NST_INIT and NST_RESET. will reset the unit (next exec will return first node).

MISC:

the tOpt interface accepts further option. see "-help" option and the "genbox" stand-alone executable (conditional main()).

FILE

/local/homes/rhaschke/nst7/man/../o.linx86//../foldersrc/nst_psom_aux3.c