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

8.13 Vector fields (MGL)

These commands perform plotting of 2D and 3D vector fields. There are 6 generally different types of vector fields representations: simple vector field (vect), vector field by dew-drops (dew), flow threads (flow), flow pipes (pipe), vectors along a curve (traj). Each type of plotting has similar interface. There are 2 kind of versions which handle the arrays of data and coordinates or only single data array. Parameters of color scheme are specified by the string argument. See section Color scheme.

The color is specified by the string argument sch. Previous color scheme is used by default. Parameter flag setup the hachures (arrows). It is combination of values: 1 for drawing bi-color arrow, 2 for drawing fixed length arrows, 4 for drawing arrows to the cell point, 8 for drawing arrows with center at cell point, 16 for drawing hachures with dots instead of arrows.

The size of udat, vdat and wdat must be equal. The minor dimensions of arrays xdat, ydat, zdat and udat must be equal too. Arrays xdat, ydat and zdat can be vectors (not matrices as udat). The graphics is plotted for each z slice of udat, vdat for 2D case.

MGL command: traj xdat ydat udat vdat ['sch'='' zval=nan len=0]
MGL command: traj xdat ydat zdat udat vdat wdat ['sch'='' len=0]

Draws vectors {udat, vdat, wdat} along a curve xdat, ydat, zdat. The length and color of arrows are proportional to \sqrtudat^2+vdat^2+wdat^2. See also vect. See section Traj sample, for sample code and picture.

MGL command: vect udat vdat ['sch'='' zval=nan flag=0]
MGL command: vect xdat ydat udat vdat ['sch'='' zval=nan flag=0]

Draws plane vector field plot for the field {udat, vdat} depending parametrically on coordinates xdat, ydat at level z=zval. The length and color of arrows are proportional to \sqrtudat^2+vdat^2. The number of arrows depend on meshnum. See also flow, dew, vectc. See section Vect sample, for sample code and picture.

MGL command: vect udat vdat wdat ['sch'='' flag=0]
MGL command: vect xdat ydat zdat udat vdat wdat ['sch'='' flag=0]

This is 3D version of the previous command. Here arrays udat, vdat, wdat must be 3-ranged tensors with equal sizes and the length and color of arrows are proportional to \sqrtudat^2+vdat^2+wdat^2. See section Vect 3D sample, for sample code and picture.

MGL command: vectc udat vdat ['sch'='' zval=nan]
MGL command: vectc xdat ydat udat vdat ['sch'='' zval=nan]

Draws plane vector field plot for the field {udat, vdat} depending parametrically on coordinates xdat, ydat at level z=zVal. The color of hachures is proportional to \sqrtudat^2+vdat^2. The number of hachures depend on meshnum. See also vect, flow, pipe, dew. See section VectC sample, for sample code and picture.

MGL command: vectc udat vdat wdat ['sch'='']
MGL command: vectc xdat ydat zdat udat vdat wdat ['sch'='']

This is 3D version of the previous command. Here arrays udat, vdat, wdat must be 3-ranged tensors with equal sizes and the color of hachures is proportional to \sqrtudat^2+vdat^2+wdat^2. See section VectC 3D sample, for sample code and picture.

MGL command: vectl udat vdat ['sch'='' zval=nan]
MGL command: vectl xdat ydat udat vdat ['sch'='' zval=nan]

Draws plane vector field plot for the field {udat, vdat} depending parametrically on coordinates xdat, ydat at level z=zVal. The length of hachures is proportional to \sqrtudat^2+vdat^2. The number of hachures depend on meshnum. See also vectc, flow, pipe, dew. See section Vect sample, for sample code and picture.

MGL command: vectl udat vdat wdat ['sch'='']
MGL command: vectl xdat ydat zdat udat vdat wdat ['sch'='']

This is 3D version of the previous command. Here arrays udat, vdat, wdat must be 3-ranged tensors with equal sizes and the length of hachures is proportional to \sqrtudat^2+vdat^2+wdat^2. See section VectL 3D sample, for sample code and picture.

MGL command: dew udat vdat ['sch'='' zval=nan]
MGL command: dew xdat ydat udat vdat ['sch'='' zval=nan]

Draws dew-drops for plane vector field {udat, vdat} depending parametrically on coordinates xdat, ydat at level z=zval. The color of drops is proportional to \sqrtudat^2+vdat^2. The number of drops depend on meshnum. Note that this is very expensive plot in memory usage and creation time! See also vect. See section Dew sample, for sample code and picture.

MGL command: flow udat vdat ['sch'='' num=5 zval=nan]
MGL command: flow xdat ydat udat vdat ['sch'='' num=5 zval=nan]

Draws plane flow threads for the vector field {udat, vdat} depending parametrically on coordinates xdat, ydat at level z=zVal. Number of threads is proportional to num. The color of lines is proportional to \sqrtudat^2+vdat^2. Warm color corresponds to normal flow (like attractor). Cold one corresponds to inverse flow (like source). See also vect, vectc, pipe. See section Flow sample, for sample code and picture.

MGL command: flow udat vdat wdat ['sch'='' num=3]
MGL command: flow xdat ydat zdat udat vdat wdat ['sch'='' num=3]

This is 3D version of the previous command. Here arrays udat, vdat, wdat must be 3-ranged tensors with equal sizes and the color is proportional to \sqrtudat^2+vdat^2+wdat^2. See section Flow 3D sample, for sample code and picture.

MGL command: flow x0 y0 udat vdat ['sch'='' zval=nan]
MGL command: flow x0 y0 xdat ydat udat vdat ['sch'='' zval=nan]

Draws plane flow threads for the vector field {udat, vdat} depending parametrically on coordinates xdat, ydat from point {x0, y0} at level z=zVal. The color of lines is proportional to \sqrtudat^2+vdat^2. Warm color corresponds to normal flow (like attractor). Cold one corresponds to inverse flow (like source). See also vect, vectc, pipe. See section Flow sample, for sample code and picture.

MGL command: flow x0 y0 z0 udat vdat wdat ['sch'='']
MGL command: flow x0 y0 z0 xdat ydat zdat udat vdat wdat ['sch'='']

Draws flow thread from point {x0, y0, z0}. Arrays udat, vdat, wdat must be 3-ranged tensors with equal sizes and the color is proportional to \sqrtudat^2+vdat^2+wdat^2. See section Flow 3D sample, for sample code and picture.

MGL command: pipe udat vdat ['sch'='' r0=0.05 num=5 zval=nan]
MGL command: pipe xdat ydat udat vdat ['sch'='' r0=0.05 num=5 zval=nan]

Draws plane flow pipes for the vector field {udat, vdat} depending parametrically on coordinates xdat, ydat at level z=zVal. Number of pipes is proportional to num. The color of pipes is proportional to \sqrtudat^2+vdat^2. Warm color corresponds to normal flow (like attractor). Cold one corresponds to inverse flow (like source). Parameter r0 set the base pipe radius. If r0<0 then pipe radius is inverse proportional to amplitude. The size of ax and ay must be equal. See also vect, vectc, pipe. See section Pipe sample, for sample code and picture.

MGL command: pipe udat vdat wdat ['sch'='' r0=0.05 num=3]
MGL command: pipe xdat ydat zdat udat vdat wdat ['sch'='' r0=0.05 num=3]

This is 3D version of the previous command. Here arrays udat, vdat, wdat must be 3-ranged tensors with equal sizes and the color is proportional to \sqrtudat^2+vdat^2+wdat^2. See section Pipe 3D sample, for sample code and picture.


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