plotfunc3d
-- 3D plots of
function graphsplotfunc3d
(f1, f2, ...)
generates a 3D
plot of the graphs of the bivariate functions f1
,
f2
etc.
plotfunc3d( <SceneOptions,> f1, f2, ... <, Grid = [nx, ny]>)
plotfunc3d( <SceneOptions,> f1, f2, ..., x = xmin..xmax
<, Grid = [nx, ny]>)
plotfunc3d( <SceneOptions,> f1, f2, ..., x = xmin..xmax, y
= ymin..ymax <, Grid = [nx,
ny]>)
f1, f1, ... |
- | the functions: arithmetical
expressions or piecewise objects containing two
indeterminates x , y |
x, y |
- | the independent variables: identifiers |
xmin, xmax |
- | the plot range for x : finite real numerical expressions |
ymin, ymax |
- | the plot range for y : finite real numerical expressions |
SceneOptions |
- | a sequence of scene options. These determine the
general appearance of the graphical scene. See ?plotOptions3d for details. |
Grid = [nx,
ny] |
- | sets the number of sample points in the x
and y direction. The integers nx ,
ny must be larger than 1; the default is Grid = [20, 20] . |
MuPAD's graphics tool is called to render the graphical
scene. The null
()
object is returned
to the MuPAD session.
plot
, plot::Function3d
, plot2d
, plot3d
, plotfunc2d
x
and y
that cannot be converted to floating
point values.x =
-5..5
and y = -5..5
are used.plot3d
as a
parametrized surface:
[Mode = Surface, [x, y, f(x, y)], x = [xmin, xmax], y = [ymin, ymax] <, Options>]:This way ranges, color options, style options etc. can be specified separately for each function. See the help page of
plot3d
for details.plot
library
provides the routine plot::Function3d
which allows to
create a function graph as a graphical primitive, and to combine it
with other graphical objects.plotfunc3d
command, the PlotDevice scene option allows to specify the conversion
into the two MuPAD specific formats 'Ascii' and 'Binary'. See the help
page plotOptions3d
for details.
For graphical standard formats such as Postscript, JPEG, TIFF etc., no direct conversion is available by a plot command inside a MuPAD session. Instead, conversion has to be requested interactively via the graphical interface of the rendering tool VCam. In a MuPAD Pro notebook, double click on the graphics to activate this interface. Using the menu item ``Edit/Save Graphics ..'', you can choose the desired format in the ``Export Graphics'' dialog box.
[nx, ny]
nx
, ny
must be larger than 1; the
default is Grid = [20, 20]
. Large
values of nx
, ny
generate a smooth
graph.The following command draws two functions over the unit square:
>> plotfunc3d(BackGround = RGB::White, ForeGround = RGB::Black, Axes = Box, sin(x^2 + y^2), cos(x^2 - y^2), x = 0..1, y = 0..1):
We demonstrate the effect of various scene options:
>> plotfunc3d(Axes = Box, Ticks = 5, abs(x + I*y), x = -1..1, y = -1..1)
>> plotfunc3d(Arrows = FALSE, Axes = Corner, Ticks = 8, Grid = [40, 40], CameraPoint = [10, -5, 15], abs(x + I*y), x = -1..1, y = -1..1)
In contrast to plotfunc2d
, non-real function
values cause an error:
>> plotfunc3d(sqrt(1 - x^2 - y^2), x = -1..1, y = -1..1):
Error: Plot function(s) must return real numbers. Type of the returned value is DOM_COMPLEX; during evaluation of 'plot3d'
Piecewise defined functions are handled:
>> f := piecewise([x < y, -x^2 + 1], [x >= y, 1 - y^2]): plotfunc3d(BackGround = RGB::White, ForeGround = RGB::Black, Ticks = [Steps = 1, Steps = 1, Steps = 1], f(x, y), x = -3..3, y = -3..3)
>> delete f:
We use the scene option AxesScaling to create a logarithmic plot:
>> plotfunc3d(AxesScaling = [Lin, Lin, Log], exp(x + y^2), x = 0..10, y = 0..10):