[ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
4.14 Vector fields
These functions perform plotting of 2D and 3D vector fields. There are 5 generally different types of vector fields representations: simple vector field (Vect), vectors along the curve (Traj), vector field by dew-drops (Dew), flow threads (Flow, FlowP), flow pipes (Pipe). By default (if absent) values of x, y, z are equidistantly distributed in axis range. The minor dimensions of arrays x, y, z, ax should be equal. The size of ax, ay and az must be equal. Arrays x, y, z can be vectors (not matrices as ax). String sch sets the color scheme (see Color scheme) for plot. String opt contain command options (see Command options).
- MGL command: traj xdat ydat udat vdat ['sch'='']
- MGL command: traj xdat ydat zdat udat vdat wdat ['sch'='']
- Method on
mglGraph
:void
Traj (const mglData &
x,const mglData &
y,const mglData &
ax,const mglData &
ay,const char *
sch=""
,const char *
opt=""
) - Method on
mglGraph
:void
Traj (const mglData &
x,const mglData &
y,const mglData &
z,const mglData &
ax,const mglData &
ay,const mglData &
az,const char *
sch=""
,const char *
opt=""
) - C function:
void
mgl_traj_xyz (HMGL
gr,HCDT
x,HCDT
y,HCDT
z,HCDT
ax,HCDT
ay,HCDT
az,const char *
sch,const char *
opt) - C function:
void
mgl_traj_xy (HMGL
gr,HCDT
x,HCDT
y,HCDT
ax,HCDT
ay,const char *
sch,const char *
opt) The function draws vectors {ax, ay, az} along a curve {x, y, z}. The length of arrows are proportional to \sqrt{ax^2+ay^2+az^2}. String pen specifies the color (see Line styles). By default (
pen=""
) color from palette is used (see Palette and colors). Option value set the vector length factor (if non-zero) or vector length to be proportional the distance between curve points (if value=0). The minor sizes of all arrays must be equal and large 2. The plots are drawn for each row if one of the data is the matrix. See also vect. See section Traj sample, for sample code and picture.
- MGL command: vect udat vdat ['sch'='']
- MGL command: vect xdat ydat udat vdat ['sch'='']
- Method on
mglGraph
:void
Vect (const mglData &
ax,const mglData &
ay,const char *
sch=""
,const char *
opt=""
) - Method on
mglGraph
:void
Vect (const mglData &
x,const mglData &
y,const mglData &
ax,const mglData &
ay,const char *
sch=""
,const char *
opt=""
) - C function:
void
mgl_vect_2d (HMGL
gr,HCDT
ax,HCDT
ay,const char *
sch,const char *
opt) - C function:
void
mgl_vect_xy (HMGL
gr,HCDT
x,HCDT
y,HCDT
ax,HCDT
ay,const char *
sch,const char *
opt) The function draws plane vector field plot for the field {ax, ay} depending parametrically on coordinates x, y at level z=Min.z. The length and color of arrows are proportional to \sqrt{ax^2+ay^2}. The number of arrows depend on meshnum. The apperance of the hachures (arrows) can be changed by symbols:
- ‘f’ for drawing arrows with fixed lengths,
- ‘>’, ‘<’ for drawing arrows to or from the cell point (default is centering),
- ‘.’ for drawing hachures with dots instead of arrows,
- ‘=’ for enabling color gradient along arrows.
See also flow, dew. See section Vect sample, for sample code and picture.
- MGL command: vect udat vdat wdat ['sch'='']
- MGL command: vect xdat ydat zdat udat vdat wdat ['sch'='']
- Method on
mglGraph
:void
Vect (const mglData &
ax,const mglData &
ay,const mglData &
az,const char *
sch=""
,const char *
opt=""
) - Method on
mglGraph
:void
Vect (const mglData &
x,const mglData &
y,const mglData &
z,const mglData &
ax,const mglData &
ay,const mglData &
az,const char *
sch=""
,const char *
opt=""
) - C function:
void
mgl_vect_3d (HMGL
gr,HCDT
ax,HCDT
ay,HCDT
az,const char *
sch,const char *
opt) - C function:
void
mgl_vect_xyz (HMGL
gr,HCDT
x,HCDT
y,HCDT
z,HCDT
ax,HCDT
ay,HCDT
az,const char *
sch,const char *
opt) This is 3D version of the first functions. Here arrays ax, ay, az must be 3-ranged tensors with equal sizes and the length and color of arrows is proportional to \sqrt{ax^2+ay^2+az^2}.
- MGL command: dew udat vdat ['sch'='']
- MGL command: dew xdat ydat udat vdat ['sch'='']
- Method on
mglGraph
:void
Dew (const mglData &
ax,const mglData &
ay,const char *
sch=""
,const char *
opt=""
) - Method on
mglGraph
:void
Dew (const mglData &
x,const mglData &
y,const mglData &
ax,const mglData &
ay,const char *
sch=""
,const char *
opt=""
) - C function:
void
mgl_dew (HMGL
gr,HCDT
ax,HCDT
ay,const char *
sch,const char *
opt) - C function:
void
mgl_dew_xy (HMGL
gr,HCDT
x,HCDT
y,HCDT
ax,HCDT
ay,const char *
sch,const char *
opt) The function draws dew-drops for plane vector field {ax, ay} depending parametrically on coordinates x, y at level z=Min.z. Note that this is very expensive plot in memory usage and creation time! The color of drops is proportional to \sqrt{ax^2+ay^2}. The number of drops depend on meshnum. See also vect. See section Dew sample, for sample code and picture.
- MGL command: flow udat vdat ['sch'='']
- MGL command: flow xdat ydat udat vdat ['sch'='']
- Method on
mglGraph
:void
Flow (const mglData &
ax,const mglData &
ay,const char *
sch=""
,const char *
opt=""
) - Method on
mglGraph
:void
Flow (const mglData &
x,const mglData &
y,const mglData &
ax,const mglData &
ay,const char *
sch=""
,const char *
opt=""
) - C function:
void
mgl_flow_2d (HMGL
gr,HCDT
ax,HCDT
ay,const char *
sch,const char *
opt) - C function:
void
mgl_flow_xy (HMGL
gr,HCDT
x,HCDT
y,HCDT
ax,HCDT
ay,const char *
sch,const char *
opt) The function draws flow threads for the plane vector field {ax, ay} parametrically depending on coordinates x, y at level z = Min.z. Number of threads is proportional to value option (default is 5). String sch may contain:
- color scheme – up-half (warm) corresponds to normal flow (like attractor), bottom-half (cold) corresponds to inverse flow (like source);
- ‘#’ for starting threads from edges only;
- ‘v’ for drawing arrows on the threads;
- ‘x’, ‘z’ for drawing tapes of normals in x-y and y-z planes correspondingly.
See also pipe, vect, tape, barwidth. See section Flow sample, for sample code and picture.
- MGL command: flow udat vdat wdat ['sch'='']
- MGL command: flow xdat ydat zdat udat vdat wdat ['sch'='']
- Method on
mglGraph
:void
Flow (const mglData &
ax,const mglData &
ay,const mglData &
az,const char *
sch=""
,const char *
opt=""
) - Method on
mglGraph
:void
Flow (const mglData &
x,const mglData &
y,const mglData &
z,const mglData &
ax,const mglData &
ay,const mglData &
az,const char *
sch=""
,const char *
opt=""
) - C function:
void
mgl_flow_3d (HMGL
gr,HCDT
ax,HCDT
ay,HCDT
az,const char *
sch,const char *
opt) - C function:
void
mgl_flow_xyz (HMGL
gr,HCDT
x,HCDT
y,HCDT
z,HCDT
ax,HCDT
ay,HCDT
az,const char *
sch,const char *
opt) This is 3D version of the first functions. Here arrays ax, ay, az must be 3-ranged tensors with equal sizes and the color of line is proportional to \sqrt{ax^2+ay^2+az^2}.
- MGL command: flow
x0 y0
udat vdat ['sch'=''] - MGL command: flow
x0 y0
xdat ydat udat vdat ['sch'=''] - Method on
mglGraph
:void
FlowP (mglPoint
p0,const mglData &
ax,const mglData &
ay,const char *
sch=""
,const char *
opt=""
) - Method on
mglGraph
:void
FlowP (mglPoint
p0,const mglData &
x,const mglData &
y,const mglData &
ax,const mglData &
ay,const char *
sch=""
,const char *
opt=""
) - C function:
void
mgl_flowp_2d (HMGL
gr,float
x0,float
y0,float
z0,HCDT
ax,HCDT
ay,const char *
sch,const char *
opt) - C function:
void
mgl_flowp_xy (HMGL
gr,float
x0,float
y0,float
z0,HCDT
x,HCDT
y,HCDT
ax,HCDT
ay,const char *
sch,const char *
opt) The same as first one (flow) but draws single flow thread starting from point p0={x0,y0,z0}.
- MGL command: flow
x0 y0 z0
udat vdat wdat ['sch'=''] - MGL command: flow
x0 y0 z0
xdat ydat zdat udat vdat wdat ['sch'=''] - Method on
mglGraph
:void
FlowP (mglPoint
p0,const mglData &
ax,const mglData &
ay,const mglData &
az,const char *
sch=""
,const char *
opt=""
) - Method on
mglGraph
:void
FlowP (mglPoint
p0,const mglData &
x,const mglData &
y,const mglData &
z,const mglData &
ax,const mglData &
ay,const mglData &
az,const char *
sch=""
,const char *
opt=""
) - C function:
void
mgl_flowp_3d (HMGL
gr,float
x0,float
y0,float
z0,HCDT
ax,HCDT
ay,HCDT
az,const char *
sch,const char *
opt) - C function:
void
mgl_flowp_xyz (HMGL
gr,float
x0,float
y0,float
z0,HCDT
x,HCDT
y,HCDT
z,HCDT
ax,HCDT
ay,HCDT
az,const char *
sch,const char *
opt) This is 3D version of the previous functions.
- MGL command: grad pdat ['sch'='']
- MGL command: grad xdat ydat pdat ['sch'='']
- MGL command: grad xdat ydat zdat pdat ['sch'='']
- Method on
mglGraph
:void
Grad (const mglData &
phi,const char *
sch=""
,const char *
opt=""
) - Method on
mglGraph
:void
Grad (const mglData &
x,const mglData &
y,const mglData &
phi,const char *
sch=""
,const char *
opt=""
) - Method on
mglGraph
:void
Grad (const mglData &
x,const mglData &
y,const mglData &
z,const mglData &
phi,const char *
sch=""
,const char *
opt=""
) - C function:
void
mgl_grad (HMGL
gr,HCDT
phi,const char *
sch,const char *
opt) - C function:
void
mgl_grad_xy (HMGL
gr,HCDT
x,HCDT
y,HCDT
phi,const char *
sch,const char *
opt) - C function:
void
mgl_grad_xyz (HMGL
gr,HCDT
x,HCDT
y,HCDT
z,HCDT
phi,const char *
sch,const char *
opt) The function draws gradient lines for scalar field phi[i,j] (or phi[i,j,k] in 3d case) specified parametrically {x[i,j,k], y[i,j,k], z[i,j,k]}. Number of lines is proportional to value option (default is 5). If value<0 then lines start only from edges of axis range. Warm color corresponds to normal flow (like minimum). Cold one corresponds to inverse flow (like maximum). If string sch contain symbol ‘v’ then arrows are drawn on flow threads. See also dens, cont, flow.
- MGL command: pipe udat vdat ['sch'=''
r0=0.05
] - MGL command: pipe xdat ydat udat vdat ['sch'=''
r0=0.05
] - Method on
mglGraph
:void
Pipe (const mglData &
ax,const mglData &
ay,const char *
sch=""
,float
r0=0.05
,const char *
opt=""
) - Method on
mglGraph
:void
Pipe (const mglData &
x,const mglData &
y,const mglData &
ax,const mglData &
ay,const char *
sch=""
,float
r0=0.05
,const char *
opt=""
) - C function:
void
mgl_pipe_2d (HMGL
gr,HCDT
ax,HCDT
ay,const char *
sch,float
r0,const char *
opt) - C function:
void
mgl_pipe_xy (HMGL
gr,HCDT
x,HCDT
y,HCDT
ax,HCDT
ay,const char *
sch,float
r0,const char *
opt) The function draws flow pipes for the plane vector field {ax, ay} parametrically depending on coordinates x, y at level z = Min.z. Number of pipes is proportional to value option (default is 5). If ‘#’ symbol is specified then pipes start only from edges of axis range. The color of lines is proportional to \sqrt{ax^2+ay^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 or symbol ‘i’ is specified then pipe radius is inverse proportional to amplitude. The vector field is plotted for each z slice of ax, ay. See also flow, vect. See section Pipe sample, for sample code and picture.
- MGL command: pipe udat vdat wdat ['sch'=''
r0=0.05
] - MGL command: pipe xdat ydat zdat udat vdat wdat ['sch'=''
r0=0.05
] - Method on
mglGraph
:void
Pipe (const mglData &
ax,const mglData &
ay,const mglData &
az,const char *
sch=""
,float
r0=0.05
,const char *
opt=""
) - Method on
mglGraph
:void
Pipe (const mglData &
x,const mglData &
y,const mglData &
z,const mglData &
ax,const mglData &
ay,const mglData &
az,const char *
sch=""
,float
r0=0.05
,const char *
opt=""
) - C function:
void
mgl_pipe_3d (HMGL
gr,HCDT
ax,HCDT
ay,HCDT
az,const char *
sch,float
r0,const char *
opt) - C function:
void
mgl_pipe_xyz (HMGL
gr,HCDT
x,HCDT
y,HCDT
z,HCDT
ax,HCDT
ay,HCDT
az,const char *
sch,float
r0,const char *
opt) This is 3D version of the first functions. Here arrays ax, ay, az must be 3-ranged tensors with equal sizes and the color of line is proportional to \sqrt{ax^2+ay^2+az^2}.
[ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This document was generated on April 13, 2012 using texi2html 5.0.