Previous Page Next Page Contents

plot::Surface3d -- graphical primitive for a three-dimensional surface plot

Introduction

plot::Surface3d([x, y, z], u = a..b, v = c..d) represents a plot of the surface defined by (u,v) -> (x(u,v); y(u,v); z(u,v)) with (u,v) in [a,b] x [c,d].

Creating Elements

plot::Surface3d([x, y, z], u = a..b, v = c..d <, option1, option2...>)

Parameters

x, y, z - arithmetical expressions in u and v
u, v - identifiers
a, b, c, d - arithmetical expressions
option1, option2, ... - plot option(s) of the form OptionName = value

Related Domains

plot::Curve3d, plot::Function3d, RGB

Related Functions

plot, plot3d, plot::copy

Details

Operands

An object of plot::Surface3d consists of three operands. The first operand is the list [x, y, z]. The second operand is the first parameter of the surface and its range in the form u = a..b, and the third one is the second parameter of the surface and its range in the form v = c..d.

Important Operations

Operands of a surface primitive can be accessed either using the system function op, the index operator [ ], or using the attributes described above. For example, if surface is such an object, then the calls op(surface,1), surface[1] and surface::term return the list [x, y, z].

Via surface[1] := [x_new, y_new, z_new] or surface::term := [x_new, y_new, z_new, the parametrization of a surface plot can be changed.

See the methods "op", "_index", "set_index" and "slot" below.

Use the slot operator :: to get or set plot options of such objects afterwards, i.e., when they have been created. For example, if surface is such an object, then surface::Color := RGB::Red changes the color of the surface primitive surface to red.

Result of Evaluation

Evaluating an object of type plot::Surface3d returns itself.

Function Call

Calling an object of plot::Surface3d as a function yields the object itself, regardless of the arguments. The arguments are not evaluated.

Entries

defaultOptions

is a table of plot options for surface primitives and their default values. Each entry has the form OptionName = default_value.

When an object of the domain plot::Surface3d is created, then a copy of this table is stored under the attribute options (see the table of attributes above), where those options are added and replaced, respectively, which are given by the (optional) parameters option1, option2... of the creating call (see ``Creating Elements'' above).

Plot options, which are not contained in the table stored under the attribute options will not be included in the plot data of the object created by the method "getPlotdata" (see below).

For those options, the corresponding default value either is set by a graphical scene, if the option also exists as a scene option (such as the option PointWidth), or it is internally set by the function plot3d which is used to plot the object. See the table of plot options above, which gives a summary of the available plot options for function primitives and their default values.

See the examples of the help page of plot::Function3d.

To change the default value of some plot options, the option name and its default value may be added to the table "defaultOptions", or replaced by a new value, respectively.

optionNames

is a set of the available option names for plots of three-dimensional surfaces.

Method _index: indexed access to the operands of a surface primitive

Method dimension: dimension of a surface primitive

Method getPlotdata: the plot data of a surface primitive

Method nops: number of operands of a surface primitive

Method op: extract operands of a surface primitive

Method set_index: set operands of a surface primitive

Method slot: read and write attributes and plot options

Method checkOption: check a plot option

Method copy: create a copy of a surface primitive

Method modify: modify a copy of a surface primitive

Method print: print a surface primitive

Example 1

The following call returns an object representing a plot of the surface defined by (u,v) -> (u, sin(v), cos(v)) with (u,v) in [0,2*PI] x [-1,1]:

>> s1 := plot::Surface3d( 
     [u, sin(v), cos(v)], u = 0..2*PI, v = -1..1 
   )
       plot::Surface3d([u, sin(v), cos(v)], u = 0..2 PI, v = -1..1)

To plot this surface in a graphical scene, call:

>> plot(s1)

Plot options of the surface can be given as additional parameters in the creating call, such as displaying the graph as an opaque object together with the parameter lines:

>> s2 := plot::Surface3d( 
     [u, sin(v), cos(v)], u = 0..2*PI, v = -1..1,
     Style = [HiddenLine, Mesh]
   )
       plot::Surface3d([u, sin(v), cos(v)], u = 0..2 PI, v = -1..1)
>> plot(s2)

To change default values of some scene options, pass the scene options to the call of plot as additional arguments. For example, to change the style of the axes:

>> plot(s2, Axes = Corner)

See the help page of plot::Scene for available scene options.

Please refer to the examples of the help page of plot::Function3d about working with options and attributes.

Changes




Do you have questions or comments?


Copyright © SciFace Software GmbH & Co. KG 2000