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

6.3 Fill

Method on mglData (C++, Python): void Fill (float x1, float x2, char dir='x')
C function: void mgl_data_fill (HMDT dat, float x1, float x2, char dir)

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

Method on mglData (C++, Python): void Fill (const char *eq, mglPoint Min, mglPoint Max, const mglData *vdat=0, const mglData *wdat=0)
C function: void mgl_data_fill (HMGL gr, HMDT dat, const char *eq, const HMDT *vdat, const HMDT *wdat)

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 range Min x Max (in difference from Modify functions). Variable ‘u’ is the original value of the array. Variables ‘v’ and ‘w’ are values of vdat, wdat which can be NULL (i.e. can be omitted).

Method on mglData (C++, Python): void Modify (const char *eq, int dim=0)
Method on mglData (C++, Python): void Modify (const char *eq, const mglData &v)
Method on mglData (C++, Python): void Modify (const char *eq, const mglData &v, const mglData &w)
C function: void mgl_data_modify (HMDT dat, const char *eq, int dim)
C function: void mgl_data_modify_vw (HMDT dat, const char *eq, const HMDT v, const HMDT w)

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 range [0,1] (in difference from Fill functions). Variable ‘u’ is the original value of the array. Variables ‘v’ and ‘w’ are values of vdat, wdat which can be NULL (i.e. can be omitted). If dim>0 is specified then modification will be fulfilled only for slices >=dim.

Method on mglData (C++, Python): void Put (float val, int i=-1, int j=-1, int k=-1)
mglData: void mgl_data_put_val (HMDT a, float val, int i, int j, int k)

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, Put(val,-1,0,-1); sets a[i,0,j]=val for i=0...(nx-1), j=0...(nz-1).

Method on mglData (C++, Python): void Put (const mglData &v, int i=-1, int j=-1, int k=-1)
mglData: void mgl_data_put_dat (HMDT a, const HMDT v, int i, int j, int k)

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, Put(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.

C function: void mgl_data_set_value (HMDT dat, float v, int i, int j, int k)

Sets the value in specified cell of the data with border checking.

C function: float mgl_data_get_value (HMDT dat, int i, int j, int k)

Gets the value in specified cell of the data with border checking.

Method on mglData (C+, Python): void GetNx ()
C function: float mgl_data_get_nx (HMDT dat)

Gets the x-size of the data.

Method on mglData (C+, Python): void GetNy ()
C function: float mgl_data_get_ny (HMDT dat)

Gets the y-size of the data.

Method on mglData (C+, Python): void GetNz ()
C function: float mgl_data_get_nz (HMDT dat)

Gets the z-size of the data.


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