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

3.10.12 Grad

Method on mglGraph (C++, Python): void Grad (const mglData &x, const mglData &y, const mglData &z, const mglData &phi, const char *sch="", int num=5)
C function: void mgl_grad_xyz (HMGL gr, const HMDT x, const HMDT y, const HMDT z, const char *sch, int num, float zVal)

The function draws gradient lines for scalar field phi[i,j,k] specified parametrically {x[i,j,k], y[i,j,k], z[i,j,k]}. String sch sets the color scheme. Previous color scheme is used by default. Number of lines is proportional to num. If num<0 then lines start from borders only. The minor dimensions of arrays x, y, z, phi should be equal x.nx=phi.nx && y.nx=phi.ny && z.nx=phi.nz or x.nx=y.nx=z.nx=phi.nx && x.ny=y.ny=z.ny=phi.ny && x.nz=y.nz=z.nz=phi.nz. Arrays x, y and z can be vectors (not matrices as phi). See also Dens3, Cont3, Flow.

Method on mglGraph (C++, Python): void Grad (const mglData &x, const mglData &y, const mglData &z, const char *sch="", int num=5, float zVal=NAN)
C function: void mgl_grad_xy (HMGL gr, const HMDT x, const HMDT y, const HMDT z, const char *sch, int num, float zVal)

The function draws gradient lines for scalar field phi[i,j] specified parametrically {x[i,j], y[i,j], phi[i,j]} at z = zVal. String sch sets the color scheme. Previous color scheme is used by default. Number of lines is proportional to num. If num<0 then lines start from borders only. The minor dimensions of arrays x, y, phi should be equal x.nx=phi.nx && y.nx=phi.ny or x.nx=y.nx=phi.nx && x.ny=y.ny=phi.ny. Arrays x and y can be vectors (not matrices as phi). Lines are plotted for each z slice of the data. See also Dens, Cont, ContF, Flow. See section Grad sample, for sample code and picture.

Method on mglGraph (C++, Python): void Grad (const mglData &z, const char *sch="", int num=5, float zVal=NAN)
C function: void mgl_grad (HMGL gr, const HMDT z, const char *sch, int num, float zVal)

The same as previous with x, y equidistantly distributed in interval [Min, Max].


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