// This is for the Motion Machine Box Figure Applet format description.
// The Applet reads this file and creates the applet, most likely
// seen on the previous page. The applet is curently set up to
// animate when a user drags the mouse. I did this to initially
// get a grasp on the speed and look of the animation but left it
// because I liked the degree of control while experimenting.
// Below are descriptions for how to use this file followed by the
// descriptors themselves.
//
// The instructions for this file-format are as follows:
//
// 1. The major functions are translate, rotate, and their variations
// described below. translate takes the relative direction (local)
// and the number of pixels to move (you can use fractions if desired).
// rotate takes a direction (x,y,z) and a fraction which will
// be a fraction of Pi (i.e., rotate x,.25 rotates about the relative
// x-axis 0.25*Pi radians)
//
// 2. To set the initial view, use the translate-initial and
// rotate-initial functions, exactly like the rotate and translate above
//
// 3. To do rotation and translation animations, use rotate-animate and
// translate-animate. They both take the direction, the "scheme" and
// amount as above. There are currently six "schemes", which
// describe the value for animation at a certain time. The schemes are
// indexed from t=0 to t=9 currently as follows:
//
// Scheme 0: 0.0, 1.0, 0.0, 1.0, 0.0, 1.0, 0.0, 1.0, 0.0, 1.0
// Scheme 1: 1.0, 0.0, 1.0, 0.0, 1.0, 0.0, 1.0, 0.0, 1.0, 0.0
// Scheme 2: 1.0, 2.0, 3.0, 4.0, 5.0, 5.5, 4.0, 3.0, 2.0, 1.0
// Scheme 3: -10.0, -9.0, -8.0, -7.0, -6.0, -5.0, -4.0, -3.0, -2.0, -1.0
// Scheme 4: 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0
// Scheme 5: -1.0. 1.0, -1.0, 1.0, -1.0, 1.0, -1.0, 1.0, -1.0, 1.0
//
// By calling one of these schemes, the Motion Machine does a linear
// interpolation through time, finds the value, and then multiples
// the amount of rotation or translation you provide by that amount
// in time. So, for schemes, 0, 1, 2, and 5, you end up getting
// a periodic effect. I.e, rotate-animate x,1,.25 rotates around the
// local x-axis by Pi/4 radians, starting at t=0 and as t goes to 1,
// the amount of rotation decreases to zero, then back to 1.0 * Pi/4
// at t=2, etc.
//
// I hope to allow the user to specify what kind of schemes they
// want to use either through the applet or simply this file. Plus,
// it would be nice to give the user the chance to use a smoother,
// non-linear interpolation.
//
// 4. drawBox takes the xlo,ylo,zlo,xhi,yhi,zhi coordinates and
// draws the box accordingly. Since the java applet starts with the
// top left corner as (0,0), it takes a while to get used to this.
//
// 5. To push onto the stackm use {, to pop, use }. For people
// unfamiliar with data structures, this could be confusing,
// so just leave the { and } where they are, or experiment
// to make a new creature until it makes sense.
//
// 6. Comments are done with // I used these to label the body
// parts to make things easier.
//
// Any comments or questions, e-mail mhl219@cims.nyu.edu or
// matthew@cat.nyu.edu
//