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

10.17 Data filling (MGL)

MGL command: fill dat v1 v2 ['dir'='x']

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

MGL command: fill dat 'eq' [vdat=0 wdat=0]

Command 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 supposed to be normalized in bounding box (in difference from modify commands). Variable ‘u’ is the original value of the array. Variables ‘v’ and ‘w’ are values of vdat, wdat.

MGL command: modify dat 'eq' [dim=0]

Command 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.

MGL command: modify dat 'eq' vdat [wdat=0]

Command 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. If optional data vdat, wdat (must be the same size as dat) are specified then variables ‘v’ and ‘w’ denote its values else they are zero.

MGL command: put a val [i=: j=: k=:]

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

MGL command: put a v [i=: j=: k=:]

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


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