manpagez: man pages & more
info mathgl
Home | html | info | man
[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

6.3 Fill

Method on mglData: void Fill (float x1, float x2, char dir='x')

Equidistantly fills the data values to range [x1, x2] in direction dir={‘x’,‘y’,‘z’}.

Method on mglData: void Modify (const char *eq, int dim=0)

Function fills the value of array according to the formula in string eq. Formula is an arbitrary expression depending on variables ‘x’, ‘y’, ‘z’, ‘u’. Coordinates ‘x’, ‘y’, ‘z’ are data indexes normalized in range [0,1]. Variable ‘u’ is the original value of the array. Modification will be fulfilled only for slices >=dim.

Method on mglData: void Modify (const char *eq, const mglData &v)
Method on mglData: void Modify (const char *eq, const mglData &v, const mglData &w)

Function fills the value of array according to the formula in string eq. Formula is an arbitrary expression depending on variables ‘x’, ‘y’, ‘z’, ‘u’, ‘v’, ‘w’. Coordinates ‘x’, ‘y’, ‘z’ are data indexes normalized in range [0,1]. Variable ‘u’ is the original value of the array. Variables ‘v’ and ‘w’ are values of vdat, wdat.

Method on mglData: void Put (float val, int i=-1, int j=-1, int k=-1)

Function sets value(s) of array a[i, j, k] = val. Negative indexes i, j, k=-1 set the value val to whole range in corresponding direction(s). For example, Fill(val,-1,0,-1); sets a[i,0,j]=val for i=0...(nx-1), j=0...(nz-1).

Method on mglData: void Put (const mglData &v, int i=-1, int j=-1, int k=-1)

Function copies value(s) from array v to the range of original array. Negative indexes i, j, k=-1 set the range in corresponding direction(s). At this minor dimensions of array v should be large than corresponding dimensions of this array. For example, Fill(v,-1,0,-1); sets a[i,0,j]=v.ny>nz ? v[i,j] : v[i], where i=0...(nx-1), j=0...(nz-1) and condition v.nx>=nx is true.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]
© manpagez.com 2000-2026
Individual documents may contain additional copyright information.