
plot3d - graphical output of threedimensional objects

Calling sequence:
plot3d([ scene-option ... ,  ]  [ object [ , object-option ... ]   ]  ...)
scene-option  --->  identifier = expr
object        --->  Mode = Curve, values, range
object        --->  Mode = Surface, values, range, range
values        --->  [expr_x, expr_y, expr_z]
range         --->  identifier_1 = [expr_1, expr_2]
object-option --->  identifier = expr

Parameter:
identifier              --  identifier
expr                    --  expression
expr_x, expr_y, expr_z  --  expressions
identifier_1            --  identifier
expr_1, expr_2          --  expressions

Summary:

plot3d is used for the graphical output of threedimensional curves, user-
defined lists and surfaces. With this any number of graphical objectscan be
combined and represented in one scene.  plot3d describes such a scene.  A
threedimensional curve is described by the following expression sequence:

          Mode=Curve, [expr_x,expr_y,expr_z], var=[expr_1,expr_2]

     Here, expr_x, expr_y and expr_z are MuPAD expressions depending on the
     variable var. These three expressions describe the x-, y- and z-coordinates
     of the curve. var has to be an identifier. The two expressions expr_1 and
     expr_2 are used to specify the upper and lower bound of the range, in which
     these expressions are to be evaluated.  It is important to note that even
     explicitly defined curves have to be given in parameter form. In the expression
     sequence above the curve is parameterized through the variable var.

     In contrast, a surface is described by the following expression sequence:

          Mode=Surface, [expr_x,expr_y,expr_z], var_u=[expr_1,expr_2],
                           var_v=[expr_3,expr_4]

     The meaning is analogue to the curve.  var_u and var_v are variables for
     parameterizing the surface which is given by the expressions expr_x, expr_y
     and expr_z.  For the variables and the value ranges the same statements
     as for curves are valid.  Through this form of specification it is possible to
     uniformly describe both a surface in parameter form and the graph  of a
     function.

     Please note that the expressions expr_x and expr_y are evaluated before
     plot3d is called. In many cases this is not desirable, because an argument
! !  of the form MyCurveX(var) is evaluated with the current value of var when
     plot3d is called. This "premature\ evaluation can be prevented by embedding

the argument in a hold function. Thus, in the example above hold(MyCurveX(var))
has to be given as the argument.

A threedimensional user-defined list can be given by the following expression
sequence:

     Mode=List, point_list

Here, point_list describes a list of user-defined threedimensional points and
polygons, which can be created by use of the functions point and polygon .

Apart from the graphical objects the user can give many options that influence
the representation of the scene and the individual objects. A default value
exists for each option. If no other value is explicitly given then the default
value is used for the output of the graphic. These pre-settings for the plot3d
options can be interactively changed by using the default window.

Before describing the objects the options for the whole scene have to be set.
An individual option is to be given in the form:

     identifier = expr

Here, indentifier is an identifier for the option and expr the expression
that gives the value of the option.

The following possibilities for describing a scene are available: PlotDevice,
Title, TitlePosition, Axes, Ticks, Arrows, Labeling, ViewingBox, Scaling,
FontFamily, FontStyle, FontSize, LineStyle, LineWidth, ForeGround,

BackGround, PointWidth PointStyle, Labels, AxesOrigin, CameraPoint
and FocalPoint.  For a more detailed list with the valid parameters and
default values please refer to table ??In addition the options in table ??can
also be used for threedimensional scenes.

After the scene options have been given, the different objects are to be
determined. Each object is to be specified in a list. As explained above, a
threedimensional object can either be a curve, a user-defined list or a surface.
To specify this the mode of the object is to be given as first argument, followed
by the expression sequences described above.  After these, further options
can be chosen in order to influence to graphical representation of the object.
These options are given like the scene options in the form:

     identifier = expr.

Admissible options are Title, TitlePosition, Color, Style, Grid and
Smoothness, whereby the specification of Title, TitlePosition and Color
is identical for all objects. They are summarized in table ??The admissible
values of the other options are dependent on the object mode. For an object
with Mode = Curve, the options are listed in table ??The available options,
values and default values for an object with Mode = Surface can be found
in table ??.  The options available for an object with Mode = List can be
found in the help pages of point and polygon .

After the execution of plot3d the graphics appears in the graphical window.
This window has an additional pop-up window , which enables the user to

interactively manipulate the graphics.

All parameters and options can be interactively changed by use of the pop-up

window. It is also possible to insert additional objects in an existing scene
or to delete objects from it.

>>  plot3d(Axes = Box, Ticks = 0,
          Title = "Graphic Example 4: Plot of Spacecurve sin(u)",
          TitlePosition = Below,
          [Mode = Curve,
               [u, u, sin(u*PI)],
               u = [-3.0, 3.0],
               Grid = [50],
               Style = [Impulses]]);

>>  plot3d(Axes = Box, Ticks = 0,
          Title = "Graphic Example 5: Spiral in form of a Sphere",
          TitlePosition = Below,
          [Mode = Curve,
               [(-3+abs(u))*cos(3*u*PI),
                (-3+abs(u))*sin(3*u*PI),
                3*cos((u+3)*1/6*PI)],
               u = [-3.0, 3.0],
               Grid = [50],
               Smoothness = [5]]);

>>  plot3d(Title = "Graphic Example 6: transparent sphere",
          TitlePosition = Below,
          Axes = None, Ticks = 0,

          [Mode = Surface,
               [sin(u)*cos(v),
                sin(u)*sin(v),
                cos(u)],
               u = [0, PI], v = [-PI, PI],
               Grid = [20, 20], Smoothness = [1, 1],
               Style = [Transparent, AndMesh]]);

>>  plot3d(Axes = None, Ticks = 0,
          Title = "Graphic Example 7: Plot of sin(u^2+v^2)",
          TitlePosition = Below,
          [Mode = Surface,
               [u, v, 1/2*sin(u*u+v*v)],
               u = [0, PI], v = [0, PI],
               Grid = [30, 30],
               Style = [HiddenLine, Mesh]]);

>>  plot3d(Axes = None, CameraPoint = [14.4, 14.4, 12.0],
          Title = "Graphic Example 8: Spiral surrounding a Sphere",
          TitlePosition = Below,
          [Mode = Curve,
               [(-3+abs(u))*cos(3*u*PI),
                (-3+abs(u))*sin(3*u*PI),
                3*cos((u+3)*1/6*PI)],
               u = [-3, 3],
               Grid = [50], Smoothness = [5],
               Title = "surrounding spiral"],
          [Mode = Surface,
               [2*sin(u)*cos(v),
                2*sin(u)*sin(v),

                2*cos(u)],
               u = [0, PI], v = [-PI, PI],
               Grid = [20, 20], Title = "sphere",
               Style = [ColorPatches, AndMesh]]);

>>  plot3d(Axes = None,
          Title = "Graphic Example 9: Three different Surfaces",
          TitlePosition = Below,
          CameraPoint = [13.0, -24.0, 20.0],
          [Mode = Surface,
               [(4+cos(v))*cos(u),
                (4+cos(v))*sin(u),
                sin(v)],
               u = [0, 2*PI], v = [0, 2*PI],
               Grid = [30, 30],
               Style = [HiddenLine, Mesh]],
          [Mode = Surface,
               [2*sin(u)*cos(v),
                2*sin(u)*sin(v),
                2*cos(u)],
               u = [0, PI], v = [-PI, PI],
               Grid = [20, 20],
               Style = [ColorPatches, AndMesh]],
          [Mode = Surface,
               [u, v, -3.0],
               u = [-5.0, 5.0], v = [-5.0, 5.0],
               Grid = [20, 20],
               Style = [ColorPatches, AndMesh]]);

See also:  plot2d

