University of California, Berkeley EECS Dept, CS Division |
||
Jordan Smith |
SLIDE: Scene Language for Interactive Dynamic Environments |
Prof. Carlo H. Séquin |
Home | Goals | Publications | People | Gallery | Assignments | Distributions |
Stereo viewing is where you trick your brain into thinking that it is viewing a real 3D object by presenting it with the two different perspective parallax views that your eyes would see. There are a number of different ways to output such an effect to the human visual system.
The physical world is where the actual human observer resides. The human has two eyes which are offset from the center of his head in the X direction by some Eye Offset (EO). The viewer's head is
The following are Tcl variables which the renderer program maintains to run the simulation engine.
The global Tcl variables are:
SLF_TIME
: How much time has passed since
the start of the simulation in seconds. Animations based on this
variable may appear to be jerky if the rendering system can not
maintain an adequate frame rate.
SLF_FRAME
: How many frames have been
updated and rendered since the start of the simulation. Animations
based on this variable may appear to slow down in time if the
rendering system can not maintain a constant frame rate, but will keep
constant spacing between frames which is useful if you are trying to
render frames of an animations which you will later replay as a movie.
The Tcl variables allocated to each render statement tcltag
use the following naming convention:
SLF
_tcltag_
field. For a
render statement which does not specify a tcltag the naming
convention is changed to the following: SLF_
field.
The following are the tcltag based variables which the renderer
currently maintains:
SLF
_tcltag_MOUSE_X
:
The X position of the mouse cursor in normalized coordinates of the
last updated associated viewport.
SLF
_tcltag_MOUSE_Y
:
The Y position of the mouse cursor in normalized coordinates of the
last updated associated viewport.
SLF
_tcltag_AXIS_X
:
The X component of the crystal ball axis of rotation maintained by the
associated render statement.
SLF
_tcltag_AXIS_Y
:
The Y component of the crystal ball axis of rotation maintained by the
associated render statement.
SLF
_tcltag_AXIS_Z
:
The Z component of the crystal ball axis of rotation maintained by the
associated render statement.
SLF
_tcltag_ANGLE
:
The crystal ball's angle of rotation around the current axis in
degrees maintained by the associated render statement.
SLF
_tcltag_SCALE
:
The zoom scale factor of the crystal ball maintained by the associated
render statement.
To make a Tcl based crystal ball you then do the following:
group gRoot ... endgroup group gCrystalBall instance gRoot scale ( {expr $SLF_BALL_SCALE} {expr $SLF_BALL_SCALE} {expr $SLF_BALL_SCALE} ) rotate ( {expr $SLF_BALL_AXIS_X} {expr $SLF_BALL_AXIS_Y} {expr $SLF_BALL_AXIS_Z} ) ( {expr $SLF_BALL_ANGLE} ) endinstance endgroup render vp gCameraRoot.instCamera.cam gCrystalBall tcltag BALL endrender
This page was originally built by Jordan Smith.
Last modified: Friday, 12-Mar-1999 16:13:16 PST