MSTTY Example Session

MSTTY is an interactive, shell-like interface to MS, the B.U. Modeling System.
Many of the commands in MSTTY have a one-to-one correspondence with one of
the C callable routines in the ms library. In addition to these modeling
commands MSTTY provides facilities for variables, arithmetic expresions,
including the trig functions, command history, file execution, subtasking
and macros. Each time mstty is invoked it will automatically read in the
command script .msrc in the users home directory.

The following is an example of a simple mstty session. The prompt up to
the ':' is printed by mstty. The text starting at and including the '!'
is commentary and is NOT typed in. Commands may be abbreviated to any
unambiguous leading substring, usually 3 letters. The objects 'World'
'CAM0' (of type camera), and 'LIGHT0' (of type light) are automatically created
by MS.
   Command(World): begin Scene          ! begin a new object 'Scene'
   Command (Scene): begin foo polygon   ! begin a polygonal subobject 'foo'
   Command (foo): prism 6               ! define a 6 sided prismatic solid
   Command (foo): color 1.0 .6 .7       ! set the color in r,g,b (0.0-1.0)
   Command (foo): rotate x 30.0         ! rotate about X axis 30 degrees
   Command (foo): rotate y 10           ! rotate about Y axis 10 degrees
   Command (foo): end                   ! end definition of 'foo'
   Command (Scene): attach =CAM0 AED    ! attach device 'AED' to camera 'CAM0'
   Command (Scene): display =CAM0 wire  ! set camera 'CAM0' to draw a wireframe
   Command (Scene): render              ! render 'Scene' (display on device AED)
   Command (Scene): rotate =foo x 22.5  ! rotate 'foo' 22.5 degrees about x
   Command (Scene): render =foo         ! render object 'foo'
   Command (Scene): macbeg dorot obj a  ! begin a macro definition
   Macro (dorot): rotate =&obj &a       ! rotate variable &obj by &a
   Macro (dorot): render =Scene         ! render 'Scene'
   Macro (dorot): macend                ! end macro definition
   Command (Scene): dorot foo 15        ! execute macro with args foo and 15
   Command (Scene): repeat 5 dorot foo 15 ! repeat macro 5 times
   Command (Scene): frame vfb 512 512   ! create a virtual frame buffer 'vfb'
   Command (Scene): att =CAM0 vfb       ! attach device 'vfb' to camera
   Command (Scene): disp =CAM0 scan     ! set camera to draw scanned (shaded)
   Command (Scene): render              ! render the current object,i.e. 'Scene'
   Command (Scene): copy vfb AED        ! copy 'vfb' to device AED
   Command (Scene): !ls                 ! issue a Unix 'ls' command
   img.rocks img.wood                   ! (printed by ls)
   Command (Scene): frame map 128 128   ! create a 128x128 frame buffer 'map'
   Command (Scene): read map img.wood   ! read an image file into 'map'
   Command (Scene): begin s1 sphere     ! create spherical subobject 's1'
   Command (s1): stretch x 1.5          ! stretch object along X axis
   Command (s1): stre y 0.5             ! stretch object along Y axis
   Command (s1): map image map          ! color map with the image in 'map'
   Command (s1): end                    ! end definition of s1
   Command (Scene): move =s1 -1 0.5 2.5 ! translate/move s1
   Command (Scene): render =s1          ! render 's1'
   Command (Scene): copy vfb X0         ! copy device 'vfb' to device 'X0'
   Command (Scene): render =Scene       ! render 'Scene'
   Command (Scene): copy vfb X0         ! copy 'vfb' to device 'X0'
   Command (Scene): dither vfb X1       ! dither/halftone 'vfb' to device 'X1'
   Command (Scene): write vfb img.foo   ! write 'vfb' to a file 'img.foo'
   Command (Scene): quit                ! quit