LiveGraphicsVectorField2D.pl - provide an interactive plot of a 2D vector field.
LiveGraphicsVectorField2D.pl
provides a macros for creating an interactive plot of a vector field via the LiveGraphics3D
Javascript applet. The routine VectorField2D()
takes two MathObject
Formulas of 2 variables as input and returns a string of plot data that can be displayed using the Live3Ddata()
routine of the LiveGraphics3D.pl
macro.
VectorField2D(options);
Options are:
Fx => Formula("y"), F = < Fx, Fy, Fz > where Fx, Fy, Fz are each
Fy => Formula("-x"), functions of 3 variables
xvar => "r", independent variable name, default "x"
yvar => "s", independent variable name, default "y"
xmin => -3, domain for xvar
xmax => 3,
ymin => -3, domain for yvar
ymax => 3,
xsamples => 3, deltax = (xmax - xmin) / xsamples
ysamples => 3, deltay = (ymax - ymin) / ysamples
axesframed => 1, 1 displays framed axes, 0 hides framed axes
xaxislabel => "R", Capital letters may be easier to read
yaxislabel => "S",
vectorcolor => "RGBColor[1.0,0.0,0.0]",
vectorscale => 0.2,
vectorthickness => 0.001,
outputtype => 1, return string of only polygons (or mesh)
2, return string of only plotoptions
3, return string of polygons (or mesh) and plotoptions
4, return complete plot