Controlling the window
x, y
Position of the window on the screen (pixels from upper left)
width, height
Width and height of the display area in pixels: scene.height = 200
title Text in the window's
title bar: scene.title = 'Planetary Orbit'
visible Make sure the
display is visible; scene2.visible = 1
makes the display named scene2 visible.
This is automatically called when new primitives are added to the display,
or the mouse is referenced. Setting visible
to 0 hides the display.
fullscreen Full screen
option; scene2.fullscreen = 1
makes the display named scene2 take
up the entire screen. In this case there is no close box visible; press
Escape to exit.
There is currently a bug in the fullscreen option for Linux/Unix/Mac OSX.
Keyset input is not recognized, including the Escape key. If you use the
fullscreen option on these systems, be sure to program a mouse input for
quitting the program.
exit If sceneb.exit
= 0, the program does not quit when the close box of the sceneb
display is clicked. The default is sceneb.exit =
1, in which case clicking the close box does make the program quit.
Controlling the view
center Location at which
the camera continually looks, even as the user rotates the position of the
camera. If you change center, the camera
moves to continue to look in the same "compass" direction toward
the new center, unless you also change forward
(see next attribute). Default (0,0,0).
autocenter scene.center
is continuously updated to be the center of the smallest axis-aligned box
containing the scene. This means that if your program moves the entire scene,
the center of that scene will continue to be centered in the window.
forward Vector pointing
in the same direction as the camera looks (that is, from the current camera
location, given by scene.mouse.camera, toward scene.center). The user rotation
controls, when active, will change this vector continuously. When forward
is changed, the camera position changes to continue looking at center.
Default (0,0,-1).
fov Field of view of
the camera in radians. This is defined as the maximum of the horizontal
and vertical fields of view. You can think of it as the angular size of
an object of size range, or as the angular size of the longer axis of the
window as seen by the user. Default pi/3.0 radians (60 degrees).
range The extent of
the region of interest away from center along
each axis. This is always 1.0/scale, so use either range
or scale depending on which makes the most
sense in your program. Default (10,10,10) or set by autoscale.
scale A scaling factor
which scales the region of interest into the sphere with unit radius. This
is always 1.0/range, so use either range
or scale depending on which makes the most
sense in your program. Default (0.1,0.1,0.1) or set by autoscale.
uniform = 0 each axis
has different units and scales
autoscale will
scale axes independently
the x and y
axes will be scaled by the aspect ratio of the window
uniform = 1 each axis
has the same scale
autoscale scales
axes together
the aspect
ratio of the window does not affect scaling
up A vector representing
world-space up. This vector will always project to a vertical line on the
screen (think of the camera as having a "plumb bob" that keeps
the top of the screen oriented toward up). The camera also rotates around
this axis when the user rotates "horizontally". By default the
y axis is the up vector.
There is an interaction between up
and forward, the direction that the camera
is pointing. By default, the camera points in the -z direction (0,0,-1).
In this case, you can make the x or y axes (or anything between) be the
up vector, but you cannot make the z axis
be the up vector, because this is the axis
about which the camera rotates when you set the up
attribute. If you want the z axis to point up, first set forward
to something other than the -z axis, for example (1,0,0).
autoscale = 0 no automatic
scaling (set range or scale explicitly)
autoscale
= 1 automatic scaling (default)
It is often useful to let Visual
make an initial display with autoscaling, then turn autoscaling off to prevent
further automated changes.
userzoom = 0 user cannot
zoom in and out of the scene
userzoom
= 1 user can zoom (default)
userspin = 0 user cannot
rotate the scene
userspin
= 1 user can rotate (default)