LiveGraphicsVectorField3D.pl - provide an interactive plot of a 3D vector field.
This macro provides a method for creating an interactive plot of a vector field via the LiveGraphics3D
JavaScript applet. The method takes three MathObject
Formulas of three variables as input and returns a string of plot data that can be displayed using the Live3Ddata
routine of the LiveGraphics3D.pl macro.
Usage: VectorField3D(%options)
The available options are as follows.
Fx => Formula('y')
Function for the x
-coordinate.
Fy => Formula('-x')
Function for the y
-coordinate.
Fz => Formula('x + y + z')
Function for the z
-coordinate.
xvar => 'x'
First independent variable name, default 'x'. This must correspond to the first variable used in the Fx
, Fy
, and Fz
.
yvar => 'y'
Second independent variable name, default 'y'. This must correspond to the second variable used in the Fx
, Fy
, and Fz
.
zvar => 'z'
Third independent variable name, default 'z'. This must correspond to the third variable used in the Fx
, Fy
, and Fz
.
xmin => -3
Lower bound for the domain of the first independent variable.
xmax => 3
Upper bound for the domain of the first independent variable.
ymin => -3
Lower bound for the domain of the second independent variable.
ymax => 3
Upper bound for the domain of the second independent variable.
zmin => -3
Lower bound for the domain of the third independent variable.
zmax => 3
Upper bound for the domain of the third independent variable.
xsamples => 20
The number of sample values for the first independent variable in the interval from xmin
to xmax
to use.
ysamples => 20
The number of sample values for the second independent variable in the interval from ymin
to ymax
to use.
zsamples => 20
The number of sample values for the third independent variable in the interval from zmin
to zmax
to use.
axesframed => 1
If set to 1 then the framed axes are displayed. If set to 0, the the framed axes are not shown. This is 1 by default.
xaxislabel => 'x'
Label for the axis corresponding to the first independent variable.
yaxislabel => 'y'
Label for the axis corresponding to the second independent variable.
zaxislabel => 'z'
Label for the axis corresponding to the third independent variable.
vectorcolor => 'RGBColor[0.0, 0.0, 1.0]'
Color of vectors shown in the slope field.
vectorscale => 0.2
Multiplier that determines the lentgh of vectors shown in the slope field.
vectorthickness => 0.001
Thickness (or width) of the line segments used to construct the vectors shown in the slope field.
outputtype => 1
This determines what is contained in the string that the method returns. The values of 1 through 4 are accepted, and have the following meaning.
Return a string of only polygons (or edge mesh).
Return a string of only plot options.
Return a string of polygons (or edge mesh) and plot options.
Return the complete plot to be passed directly to the Live3DData
method.