Previous Page Next Page Contents

plotfunc3d -- 3D plots of function graphs

Introduction

plotfunc3d(f1, f2, ...) generates a 3D plot of the graphs of the bivariate functions f1, f2 etc.

Call(s)

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]>)

Parameters

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

Options

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].

Returns

MuPAD's graphics tool is called to render the graphical scene. The null() object is returned to the MuPAD session.

Related Functions

plot, plot::Function3d, plot2d, plot3d, plotfunc2d

Details

Option: Grid = [nx, ny]

Example 1

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):

Example 2

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)

Example 3

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'

Example 4

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:

Example 5

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):

Changes




Do you have questions or comments?


Copyright © SciFace Software GmbH & Co. KG 2000