ThreeDimensionalViewport¶
view3D.spad line 1 [edit on github]
ThreeDimensionalViewport creates viewports to display graphs
- axes: (%, String) -> Void
axes(v, s)
displays the axes of the given three-dimensional viewport,v
, which is of domain ThreeDimensionalViewport, ifs
is “on”, or does not display the axes ifs
is “off”.
- clipSurface: (%, String) -> Void
clipSurface(v, s)
displays the graph with the specified clipping region removed ifs
is “on”, or displays the graph without clipping implemented ifs
is “off”, for the given three-dimensional viewport,v
, which is of domain ThreeDimensionalViewport.
- close: % -> Void
close(v)
closes the viewport window of the given three-dimensional viewport,v
, which is of domain ThreeDimensionalViewport, and terminates the corresponding process ID.
- coerce: % -> OutputForm
from CoercibleTo OutputForm
- colorDef: (%, Color, Color) -> Void
colorDef(v, c1, c2)
sets the range of colors along the colormap so that the lower end of the colormap is defined byc1
and the top end of the colormap is defined byc2
, for the given three-dimensional viewport,v
, which is of domain ThreeDimensionalViewport.
- controlPanel: (%, String) -> Void
controlPanel(v, s)
displays the control panel of the given three-dimensional viewport,v
, which is of domain ThreeDimensionalViewport, ifs
is “on”, or hides the control panel ifs
is “off”.
- diagonals: (%, String) -> Void
diagonals(v, s)
displays the diagonals of the polygon outline showing a triangularized surface instead of a quadrilateral surface outline, for the given three-dimensional viewportv
which is of domain ThreeDimensionalViewport, ifs
is “on”, or does not display the diagonals ifs
is “off”.
- dimensions: (%, NonNegativeInteger, NonNegativeInteger, PositiveInteger, PositiveInteger) -> Void
dimensions(v, x, y, width, height)
sets the position of the upper left-hand corner of the three-dimensional viewport,v
, which is of domain ThreeDimensionalViewport, to the window coordinatex
,y
, and sets the dimensions of the window to that ofwidth
,height
. The new dimensions are not displayed until the function makeViewport3D is executed again forv
.
- drawStyle: (%, String) -> Void
drawStyle(v, s)
displays the surface for the given three-dimensional viewportv
which is of domain ThreeDimensionalViewport in the style of drawing indicated bys
. Ifs
is not a valid drawing style the style is wireframe by default. Possible styles are"shade"
,"solid"
or"opaque"
,"smooth"
, and"wireMesh"
.
- eyeDistance: (%, Float) -> Void
eyeDistance(v, d)
sets the distance of the observer from the center of the graph tod
, for the viewportv
, which is of the domain ThreeDimensionalViewport.
- hitherPlane: (%, Float) -> Void
hitherPlane(v, h)
sets the hither clipping plane of the graph toh
, for the viewportv
, which is of the domain ThreeDimensionalViewport.
- intensity: (%, Float) -> Void
intensity(v, i)
sets the intensity of the light source toi
, for the given three-dimensional viewport,v
, which is of domain ThreeDimensionalViewport.
- key: % -> Integer
key(v)
returns the process ID number of the given three-dimensional viewport,v
, which is of domain ThreeDimensionalViewport.
- latex: % -> String
from SetCategory
- lighting: (%, Float, Float, Float) -> Void
lighting(v, x, y, z)
sets the position of the light source to the coordinatesx
,y
, andz
and displays the graph for the given three-dimensional viewport,v
, which is of domain ThreeDimensionalViewport.
- makeViewport3D: % -> %
makeViewport3D(v)
takes the given three-dimensional viewport,v
, of the domain ThreeDimensionalViewport and displays a viewport window on the screen which contains the contents ofv
.
- makeViewport3D: (ThreeSpace DoubleFloat, List DrawOption) -> %
makeViewport3D(sp, lopt)
takes the given space,sp
which is of the domain ThreeSpace and displays a viewport window on the screen which contains the contents ofsp
, and whose draw options are indicated by the listlopt
, which is a list of options from the domainDrawOption
.
- makeViewport3D: (ThreeSpace DoubleFloat, String) -> %
makeViewport3D(sp, s)
takes the given space,sp
which is of the domain ThreeSpace and displays a viewport window on the screen which contains the contents ofsp
, and whose title is given bys
.
- modifyPointData: (%, NonNegativeInteger, Point DoubleFloat) -> Void
modifyPointData(v, ind, pt)
takes the viewport,v
, which is of the domain ThreeDimensionalViewport, and places the data point,pt
into the list of points database ofv
at the index location given byind
.
- move: (%, NonNegativeInteger, NonNegativeInteger) -> Void
move(v, x, y)
displays the three-dimensional viewport,v
, which is of domain ThreeDimensionalViewport, with the upper left-hand corner of the viewport window at the screen coordinate positionx
,y
.
- options: % -> List DrawOption
options(v)
takes the viewport,v
, which is of the domain ThreeDimensionalViewport and returns a list of all the draw options from the domainDrawOption
which are being used byv
.
- options: (%, List DrawOption) -> %
options(v, lopt)
takes the viewport,v
, which is of the domain ThreeDimensionalViewport and sets the draw options being used byv
to those indicated in the list,lopt
, which is a list of options from the domainDrawOption
.
- outlineRender: (%, String) -> Void
outlineRender(v, s)
displays the polygon outline showing either triangularized surface or a quadrilateral surface outline depending on the whether the diagonals function has been set, for the given three-dimensional viewportv
which is of domain ThreeDimensionalViewport, ifs
is “on”, or does not display the polygon outline ifs
is “off”.
- perspective: (%, String) -> Void
perspective(v,s)
displays the graph in perspective ifs
is “on”, or does not display perspective ifs
is “off” for the given three-dimensional viewport,v
, which is of domain ThreeDimensionalViewport.
- reset: % -> Void
reset(v)
sets the current state of the graph characteristics of the given three-dimensional viewport,v
, which is of domain ThreeDimensionalViewport, back to their initial settings.
- resize: (%, PositiveInteger, PositiveInteger) -> Void
resize(v, w, h)
displays the three-dimensional viewport,v
, which is of domain ThreeDimensionalViewport, with a width ofw
and a height ofh
, keeping the upper left-hand corner position unchanged.
- rotate: (%, Float, Float) -> Void
rotate(v, th, phi)
rotates the graph to the longitudinal view angleth
radians and the latitudinal view anglephi
radians for the viewportv
, which is of the domain ThreeDimensionalViewport.
- rotate: (%, Integer, Integer) -> Void
rotate(v, th, phi)
rotates the graph to the longitudinal view angleth
degrees and the latitudinal view anglephi
degrees for the viewportv
, which is of the domain ThreeDimensionalViewport. The new rotation position is not displayed until the function makeViewport3D is executed again forv
.
- showClipRegion: (%, String) -> Void
showClipRegion(v, s)
displays the clipping region of the given three-dimensional viewport,v
, which is of domain ThreeDimensionalViewport, ifs
is “on”, or does not display the region ifs
is “off”.
- showRegion: (%, String) -> Void
showRegion(v, s)
displays the bounding box of the given three-dimensional viewport,v
, which is of domain ThreeDimensionalViewport, ifs
is “on”, or does not display the box ifs
is “off”.
- subspace: % -> ThreeSpace DoubleFloat
subspace(v)
returns the contents of the viewportv
, which is of the domain ThreeDimensionalViewport, as a subspace of the domainThreeSpace
.
- subspace: (%, ThreeSpace DoubleFloat) -> %
subspace(v, sp)
places the contents of the viewportv
, which is of the domain ThreeDimensionalViewport, in the subspacesp
, which is of the domainThreeSpace
.
- title: (%, String) -> Void
title(v, s)
changes the title which is shown in the three-dimensional viewport window,v
of domain ThreeDimensionalViewport.
- translate: (%, Float, Float) -> Void
translate(v, dx, dy)
sets the horizontal viewport offset todx
and the vertical viewport offset tody
, for the viewportv
, which is of the domain ThreeDimensionalViewport.
- viewDeltaXDefault: () -> Float
viewDeltaXDefault()
returns the current default horizontal offset from the center of the viewport window.
- viewDeltaXDefault: Float -> Float
viewDeltaXDefault(dx)
sets the current default horizontal offset from the center of the viewport window to bedx
and returnsdx
.
- viewDeltaYDefault: () -> Float
viewDeltaYDefault()
returns the current default vertical offset from the center of the viewport window.
- viewDeltaYDefault: Float -> Float
viewDeltaYDefault(dy)
sets the current default vertical offset from the center of the viewport window to bedy
and returnsdy
.
- viewPhiDefault: () -> Float
viewPhiDefault()
returns the current default latitudinal view angle in radians.
- viewPhiDefault: Float -> Float
viewPhiDefault(p)
sets the current default latitudinal view angle in radians to the valuep
and returnsp
.
- viewpoint: % -> Record(theta: DoubleFloat, phi: DoubleFloat, scale: DoubleFloat, scaleX: DoubleFloat, scaleY: DoubleFloat, scaleZ: DoubleFloat, deltaX: DoubleFloat, deltaY: DoubleFloat)
viewpoint(v)
returns the current viewpoint setting of the given viewport,v
. This function is useful in the situation where the user has created a viewport, proceeded to interact with it via the control panel and desires to save the values of the viewpoint as the default settings for another viewport to be created using the system.
- viewpoint: (%, Float, Float) -> Void
viewpoint(v, th, phi)
sets the longitudinal view angle toth
radians and the latitudinal view angle tophi
radians for the viewportv
, which is of the domain ThreeDimensionalViewport. The new viewpoint position is not displayed until the function makeViewport3D is executed again forv
.
- viewpoint: (%, Float, Float, Float) -> Void
viewpoint(v, rotx, roty, rotz)
sets the rotation about thex
-axis to berotx
radians, sets the rotation about they
-axis to beroty
radians, and sets the rotation about thez
-axis to berotz
radians, for the viewportv
, which is of the domain ThreeDimensionalViewport and displaysv
with the new view position.
- viewpoint: (%, Float, Float, Float, Float, Float) -> Void
viewpoint(v, th, phi, s, dx, dy)
sets the longitudinal view angle toth
radians, the latitudinal view angle tophi
radians, the scale factor tos
, the horizontal viewport offset todx
, and the vertical viewport offset tody
for the viewportv
, which is of the domain ThreeDimensionalViewport. The new viewpoint position is not displayed until the function makeViewport3D is executed again forv
.
- viewpoint: (%, Integer, Integer, Float, Float, Float) -> Void
viewpoint(v, th, phi, s, dx, dy)
sets the longitudinal view angle toth
degrees, the latitudinal view angle tophi
degrees, the scale factor tos
, the horizontal viewport offset todx
, and the vertical viewport offset tody
for the viewportv
, which is of the domain ThreeDimensionalViewport. The new viewpoint position is not displayed until the function makeViewport3D is executed again forv
.
- viewpoint: (%, Record(theta: DoubleFloat, phi: DoubleFloat, scale: DoubleFloat, scaleX: DoubleFloat, scaleY: DoubleFloat, scaleZ: DoubleFloat, deltaX: DoubleFloat, deltaY: DoubleFloat)) -> Void
viewpoint(v, viewpt)
sets the viewpoint for the viewport. The viewport record consists of the latitudal and longitudal angles, the zoom factor, theX
,Y
, andZ
scales, and theX
andY
displacements.
- viewport3D: () -> %
viewport3D()
returns an undefined three-dimensional viewport of the domain ThreeDimensionalViewport whose contents are empty.
- viewThetaDefault: () -> Float
viewThetaDefault()
returns the current default longitudinal view angle in radians.
- viewThetaDefault: Float -> Float
viewThetaDefault(t)
sets the current default longitudinal view angle in radians to the valuet
and returnst
.
- viewZoomDefault: () -> Float
viewZoomDefault()
returns the current default graph scaling value.
- viewZoomDefault: Float -> Float
viewZoomDefault(s)
sets the current default graph scaling value tos
and returnss
.
- write: (%, String) -> String
write(v, s)
takes the given three-dimensional viewport,v
, which is of domain ThreeDimensionalViewport, and creates a directory indicated bys
, which contains the graph data file forv
.
- write: (%, String, List String) -> String
write(v, s, lf)
takes the given three-dimensional viewport,v
, which is of domain ThreeDimensionalViewport, and creates a directory indicated bys
, which contains the graph data file forv
and the optional file types indicated by the listlf
.
- write: (%, String, String) -> String
write(v, s, f)
takes the given three-dimensional viewport,v
, which is of domain ThreeDimensionalViewport, and creates a directory indicated bys
, which contains the graph data file forv
and an optional file typef
.
- zoom: (%, Float) -> Void
zoom(v, s)
sets the graph scaling factor tos
, for the viewportv
, which is of the domain ThreeDimensionalViewport.
- zoom: (%, Float, Float, Float) -> Void
zoom(v, sx, sy, sz)
sets the graph scaling factors for thex
-coordinate axis tosx
, they
-coordinate axis tosy
and thez
-coordinate axis tosz
for the viewportv
, which is of the domain ThreeDimensionalViewport.