## `plotOptions3d` -- scene options for 3D plots

#### Introduction

This page describes the scene options that may be used when generating 3D graphics via `plot3d`, `plotfunc3d`, `plot::Scene`, or `plot`. Scene options are attributes that determine the general appearance of a graphical scene such as camera point, background color, title, axes style etc.

#### Call(s)

`plot3d( <SceneOpt1, SceneOpt2, ...>, graphical objects)`
`plotfunc3d( <SceneOpt1, SceneOpt2, ...>, graphical objects)`
`plot::Scene(graphical objects, <SceneOpt1, SceneOpt2, ...>)`
`plot(graphical objects, <SceneOpt1, SceneOpt2, ...>)`

#### Parameters

`graphical objects` | - | see the help pages of `plot3d`, `plotfunc3d`, `plot::Scene`, and `plot` for details

#### Options

`SceneOpt1, SceneOpt2, ..` | - | scene options: each is an equation of the form `OptionName = value`.

`OptionName` | admissible values | default value
Arrows | `TRUE`, `FALSE` | `FALSE`
Axes | Box, Corner, None, Origin | Box
AxesOrigin | Automatic, `[x0, y0, z0]` | Automatic
AxesScaling | [Lin/Log, Lin/Log, Lin/Log] | [Lin, Lin, Lin]
BackGround | `[r, g, b]` | `RGB::White`
CameraPoint | Automatic, `[x, y, z]` | Automatic
FocalPoint | Automatic, `[x, y, z]` | Automatic
FontFamily | `"helvetica"`, `"lucida"`, .. | `"helvetica"`
FontSize | positive integers | `8`
FontStyle | `"bold"`, .. | `"bold"`
ForeGround | `[r, g, b]` | `RBG::Black`
Labeling | `TRUE`, `FALSE` | `TRUE`
Labels | `[string, string, string]` | `["x","y","z"]`
LineStyle | SolidLines, DashedLines | SolidLines
LineWidth | positive integers | `1`
PlotDevice | Screen, `"filename"`, `["filename",Ascii]`, `["filename",Binary]` | Screen
PointStyle | Circles, FilledCircles, FilledSquares, Squares | FilledSquares
PointWidth | positive integers | `30`
Scaling | Constrained, UnConstrained | UnConstrained
Ticks | Automatic, None, an integer or `[xValue, yValue, zValue]`. Admissible values for `xValue`, `yValue`, `zValue` are Automatic, an integer, Steps = `d`, Steps = `[d, n]`, or a list of user defined ticks. | Automatic
Title | strings | `""` (`plot3d`)
|  | `"f(x, y)"`
|  | `""` (`plotfunc3d`)
|  | `""` (`plot::Scene`)
|  | `""` (`plot`)
TitlePosition | Above, Below, `[x, y]` | Above
ViewingBox | Automatic | Automatic

#### Related Functions

`plot`, `plot::Scene`, `plot`, `plot2d`, `plotfunc2d`, `plotOptions2d`, `plot3d`, `plotfunc3d`

#### Option: Arrows =

`value`

- This option determines, whether the axes are drawn with or without an arrow tip. Admissible values are `TRUE` or `FALSE`; the default is Arrows = `FALSE`. This option is ignored if Axes = None or Axes = Box.

#### Option: Axes =

`value`

- This option sets the style of the axes. Admissible values are Box, Corner, None, and Origin; the default is Axes = Box.
  - With Axes = None, no axes are drawn.
  - With Axes = Box, a box around the scene is drawn.
  - With Axes = Corner, a coordinate cross is drawn. It is centered at one of the corners of the scene.
  - With Axes = Origin, a coordinate cross is drawn. It is centered at the point set by AxesOrigin.

#### Option: AxesOrigin =

`value`

- This option sets the point where the coordinate axes cross. Admissible values are Automatic and `[x0, y0, z0]`; the default is AxesOrigin = Automatic.
  - With AxesOrigin = Automatic, the coordinate axes cross in the mathematical origin (0, 0, 0), provided it is inside the viewing range of the plot. If this not the case, then the axes cross at the point of the viewing range that is closest to the mathematical origin.
  - With AxesOrigin = `[x0, y0, z0]`, the coordinate axes cross at the specified point. Admissible values for the coordinates are real numerical expressions as well as the identifiers XMin, XMax, YMin, YMax, ZMin, ZMax. These are the extremal coordinates of the scene which are determined internally when the plot is evaluated.

#### Option: AxesScaling =

`[xScale, yScale, zScale]`

- This option sets the scaling of the coordinates. Admissible values for `xScale`, `yScale`, and `zScale` are either Lin for a linear scale or Log for a logarithmic scale. The default is AxesScaling = `[Lin,Lin,Lin]`.
- For logarithmic scales, make sure that the viewing range of the plot does not extend to negative coordinate values. Otherwise, an error occurs!

#### Option: BackGround = `[r, g, b]`

- This option defines the background color, i.e., the color of the canvas. The values `r`, `g`, `b` must be real numbers between `0` and `1`. They represent the red, green, and blue contributions according to the RGB color model. Pre-defined colors are provided by MuPAD's `RGB` data structure. The default is BackGround = `[1, 1, 1]` = `RGB::White`.

#### Option: CameraPoint =

value

- This option sets the position of the observer's camera. The optical axis of the camera is the vector from the CameraPoint to the FocalPoint. The value may be Automatic or a vector `[x, y, z]`. With the default Automatic, the camera position is chosen automatically outside the graphical scene. Also a user-defined point should lie outside the scene. A point close to the scene leads to perspective distortion. A point far from the scene prevents such distortion (parallel projection). The size of the projected scene is independent of the distance: the projection is enlarged automatically such that it fills the canvas.

#### Option: FocalPoint =

value

- This option sets the point the observer's camera is pointing to. The optical axis of the camera is the vector from the CameraPoint to the FocalPoint. The value may be Automatic or a vector `[x, y, z]`. With the default Automatic, the focal point is chosen automatically as the center of the graphical scene.

#### Option: FontFamily =

`FontFamilyString`

- This option defines the font family used for titles, axes labels, and tick labels. The string `FontFamilyString` may be one of `"helvetica"`, `"lucida"` etc. The default is FontFamily = `"helvetica"`.

#### Option: FontSize = `n`

- This option defines the size of the font used for titles, axes labels, and tick labels. The integer `n` may have values between 7 and 36. The default is FontSize = 8.

#### Option: FontStyle = `FontStyleString`

- This option defines the style of the font used for titles, axes labels, and tick labels. The string `FontStyleString` may be one of `"bold"`, ... . The default is FontStyle = `"bold"`.

#### Option: ForeGround = `[r, g, b]`

- This option defines the foreground color, i.e., the color for the axes, the axes labels, the tick marks, the tick labels, and the titles. Points and borderlines of filled polygons are also displayed in this color. The values `r`, `g`, `b` must be real numbers between `0` and `1`. They represent the red, green, and blue contributions according to the RGB color model. Pre-defined colors are provided by MuPAD's `RGB` data structure. The default is ForeGround = `[0, 0, 0]` = `RGB::Black`.
- Note that the foreground color does not determine the color of the graphical objects. These are either chosen automatically, or they may be defined by the color option of the objects.

#### Option: Labeling =

`value`

- This option determines, whether the axes are displayed with axes labels and tick mark labels. Admissible values are `TRUE` or `FALSE`; the default is Labeling = `TRUE`.
- Note that the default labeling of the axes may be changed via Labels. Further, the tick marks, and the tick mark labels may be set via Ticks.

#### Option: Labels = `[xString, yString, zString]`

- This option sets the labels of the axes to the text given by the strings `xString`, `yString`, and `zString`. The default is Labels = `["x", "y", "z"]`.

#### Option: LineStyle =

`value`

- This option sets the style in which all line objects of the scene are displayed. Admissible values are SolidLines and DashedLines; the default is LineStyle = SolidLines.
- Line objects are graphs of functions, curves defined by `[Mode = Curve, ..]`, the parameter lines of surfaces, and polygons generated via `[Mode = List, [..polygons..]]`. You can use the option LineStyle in the graphical objects to override this scene option and display each line object in its individual line style.

#### Option: LineWidth = `n`

- This option sets the width of all line objects in the scene. Admissible values for `n` are nonnegative integers; the default is LineWidth = 1.
- Line objects are graphs of functions, curves defined by `[Mode = Curve, ..]`, and polygons generated via `[Mode = List, [..polygons..]]`. You can use the option LineWidth in the graphical objects to override this scene option and display each line object in its individual line style.

#### Option: PlotDevice =

`value`

- This option determines, which plotting device is to be used for rendering the scene. Admissible values are Screen, a string `"filename"`, `["filename", Ascii]` or `["filename", Binary]`. The default is PlotDevice = Screen.
  - With PlotDevice = Screen, the plot is displayed on the screen.
  - With PlotDevice = `["filename", format]`, the plot is written to the file named `filename` in the specified graphical formats. Available formats are Ascii and Binary. These are mupad specific formats understood by MuPAD's graphical tool VCam. A file in such a format can later be opened and rendered by VCam.
  - PlotDevice = `"filename"` is the same as PlotDevice = `["filename", Binary]`.
- Note that MuPAD graphics can also be saved in a variety of standard graphical formats such as Postscript, JPEG, TIFF etc. However, conversion into these formats cannot be specified by a plot command inside a MuPAD session. You have to use the graphical interface of the rendering tool VCam: In a MuPAD Pro notebook, double click on the graphics to activate the VCam interface. Using the menu item ``Edit/Save Graphics ..'', you can choose the desired format in the ``Export Graphics'' dialog box.

#### Option: PointStyle =

`value`

- This option sets the style in which all point objects in the current scene are displayed. Admissible values are Circles, Squares, FilledCircles, and FilledSquares. The default is PointStyle = FilledSquares.
- Point objects are graphical primitives generated via MuPAD's function `point`. They can be displayed via `plot3d` using objects of the type `[Mode = List, [..points..]]`. You can use the object option PointStyle to override this scene option and display each point with its individual style.

#### Option: PointWidth = `n`

- This option sets the size of all point objects in the current scene. Admissible values for `n` are positive integers; the default is PointWidth = 30.
- Point objects are graphical primitives generated via MuPAD's function `point`. They can be displayed via `plot3d` using objects of the type `[Mode = List, [..points..]]`. You can use the object option PointWidth to override this scene option and display each point with its individual width.

#### Option: Scaling =

`value`

- This option determines the aspect ratio of the x, y, z coordinates. Admissible values are Constrained and UnConstrained; the default is Scaling = UnConstrained.
  - With Scaling = Constrained, the aspect ratio of the coordinates is 1:1:1. In particular, spheres appear as spheres. This mode is not appropriate if the diameters of the scene in the three directions differ significantly.
  - With Scaling = UnConstrained, the aspect ratio of the coordinates is chosen such that the scene fills the canvas optimally. In particular, spheres may appear as ellipsoids.

#### Option: Ticks =

`value`

- This option defines the ticks on the axes. Admissible values are None, Automatic, a nonnegative integer or a list `[xValue, yValue, zValue]`. The default is Ticks = Automatic.
  - With Ticks = None, no ticks are drawn.
  - With Ticks = Automatic, ticks are chosen heuristically.
  - With Ticks = `n`, the minimum value for the ticks on the three axes is specified by the nonnegative integer `n`. Note that more ticks than specified may be drawn in order to place them at reasonable positions.
  - With Ticks = `[xValue, yValue, zValue]`, the ticks can be specified separately for each axis.
  The values `xValue`, `yValue`, and `zValue` may be Automatic, a nonnegative integer, Steps = `d`, Steps = `[d, n]`, or a list of user-defined ticks.
  - Automatic produces heuristically chosen ticks. Ticks = Automatic is equivalent to Ticks = `[Automatic, Automatic, Automatic]`.
  - A nonnegative integer value sets the minimal number of ticks. The actual number of ticks as well as their positions are chosen heuristically. If the number 0 is specified, then no tick marks are produced. Ticks = `n` is equivalent to Ticks = `[n, n, n]`.
  - Steps = `d` produces ticks at the positions j*d with all integer values j leading to ticks inside the viewing range of the plot. The distance `d` between two ticks must be a real positive value.
  - Steps = `[d, n]` produces the same ``large'' ticks as Steps = `d`. Between such ticks further `n` smaller ticks are positioned. The parameter `n` must be a nonnegative integer. The ``large'' ticks carry labels if Labeling = `TRUE`. The ``small'' ticks do not carry labels.
  - Ticks can be placed at arbitrary positions by a list `[t1, t2, ..]`. Admissible values for `t1`, `t2` etc. are real numerical expressions defining the positions of the ticks. Alternatively, any element of the list may be an equation of the form `t = label`, where `t` is a numerical value and `label` is a string. This produces a tick at the position `t` with the string as label. The label is diplayed if Labeling = `TRUE` is specified. E.g.,

    `Ticks = [[0.2, PI = "PI"], [sqrt(2), 2, 3], [1, 2, 3]]`

    produces two ticks on the x-axis at the positions x = 0.2 and x = PI. The second tick carries the label `"PI"`. On the y- and z-axes, three ticks without lables are produced.

    If ticks outside the viewing range of the plot are specified, then the viewing range is extended automatically such that all ticks are visible.

#### Option: Title =

`TitleString`

- This option adds the text given by the string `TitleString` to the scene. In `plot3d`, `plot::Scene`, and `plot`, the default is the empty string Title = , i.e., no title. In `plotfunc3d`, the expressions defining the functions to be plotted are converted to title strings.

#### Option: TitlePosition =

`value`

- This option determines the position of the title. Admissible values are Above, Below, and `[x, y]`; the default is TitlePosition = Above.
  - With TitlePosition = Above, the title is centered above the scene.
  - With TitlePosition = Below, the title is centered below the scene.
  - With TitlePosition = `[x, y]`, the title may be placed at any position in the scene. The parameters `x, y` must be real numerical values between `0` and `10`. The position `[0, 0]` denotes the upper left corner of the scene, the position `[10, 10]` denotes the lower right corner.
- The title can be dragged interactively with the mouse to any appropriate position inside the scene.

#### Option: ViewingBox =

`value`

- This option sets the viewing box for the scene, i.e., the range of x, y, z that are visible on the canvas. Presently, the only admissible value is Automatic. The viewing box is chosen such that the entire scene is visible.

#### Changes

- The functionality of the scene option Ticks was extended.
- The default values of various options were changed.
- Scene titles as well as object titles can now be moved interactively by the mouse.

Do you have questions or comments?
Copyright © SciFace Software GmbH & Co. KG 2000