LiveGraphicsCylindricalPlot3D.pl - provide an interactive plot on a rectangular cylinder.
LiveGraphicsCylindricalPlot3D.pl
provides a macros for creating an interactive plot of a function of two variables z = f(r,t)
(where r
is the radius and t=theta
is the angle) via the LiveGraphics3D
javascript applet. The routine CylindricalPlot3D()
takes a MathObject
Formula of two variables defined over an annular domain and some plot options as input and returns a string of plot data that can be displayed using the Live3Ddata()
routine of the LiveGraphics3D.pl
macro.
CylindricalPlot3D(options)
Options are:
function => $f, $f is a MathObjects Formula
For example, in the setup section define
Context("Numeric");
Context()->variables->add(r=>"Real",t=>"Real");
$a = random(1,3,1);
$f = Formula("$a*r + t"); # use double quotes!
before calling CylindricalPlot3D()
rvar => "r", independent variable name, default "r"
tvar => "t", independent variable name, default "t"
rmin => 0, domain for rvar
rmax => 3,
tmin => -3, domain for tvar
tmax => 3,
rsamples => 20, deltar = (rmax - rmin) / rsamples
tsamples => 20, deltat = (tmax - tmin) / tsamples
axesframed => 1, 1 displays framed axes, 0 hides framed axes
xaxislabel => "X", Capital letters may be easier to read
yaxislabel => "Y",
zaxislabel => "Z",
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