README CPSC 314 Project 1 Matthew Walsh By submitting this file, I hereby declare that I worked individually on this assignment and that I am the only author of this code. I have listed all external resources (web pages, books) used below. I have listed all people with whom I have had significant discussions about the project below. Functionality: + and - Rotates the entire scene (and rotates the armadillo even more in that direction, I know its wierd I just wanted to be able to see it from different angles). Pressing + and - increments the speed of the rotation in positive and negative directions. To stop the rotation either SPACE or ~ can be pressed. ~ - resets the model and stops z - toggles the background SPACE - Toggles between jump cut mode and smooth transition mode. Also space resets the model and ceases any rotation that may currently be taking place. 1 and 2 - Raises and lowers tail. In jump cut mode tail jumps to up or down position. In smooth transition pressing 1 will bigin the upward movement of the tail. If the tail is in motion pressing 1 again will stop its progress. Also if the tail is moving down pressing 1 will cancel the downward motion and begin moving the tail upwards (and vice versa). 3 and 4 - Raises and lowers head. There is a subtle difference between the jump cut mode and the smooth transition mode. In jump cut mode the head move is strictly a vertical translation wheras in the smooth transition mode there is an additional neck tilt to make the motion more realistic (maybe). 5 and 6 - Rear Leg Raise. In jump cut mode 5 and 6 toggle between a 20 degree forward position and a 45 degree backwards position. In the smooth transition mode each of the toes are articulated seperately with the thumb moving more than the pinky. 7 and 8 - Front Leg Curl. In jump cut mode this toggles between a front leg back position and a front leg forward position. In smooth transition mode the toes articulate so that when in their furthest back position the line up with the shape of the body. < and > - Upper Body Turn. In jump cut mode < and > toggles between curl left and curl right. In smooth transition mode pressing < or > either once the curl is complete or in mid transition will return the body to centre position. x and c - Body Curl. In jumpcut mode this will toggle between curled in and curled out positions. In smooth transition mode pressing x or c either once the curl is complete or in mid transition will stop the curl, if it is already heading in that direction OR change its direction if it is the other direction. All motions (including rotation and jump cuts) explicitly control an animation boolean 'allMotionBoolean' which forces a redraw when required. This boolean is reset to false each cycle by the glut idle function thus preventing redraws when not required. All the above transitions can be performed simultaneously in any configuration. Explicitly as a bonus and not fully implemented motion is a walk animation which is mot compatible with the jump cut mode and can only be called in the smooth transition mode by pressing zero. 0 - Walk. Not fully compatible with all other motions, therefore calls a reset body model when called and begins a walk cycle that can be messed with if you so desire by pressing any of the other transitions (with more and less comical results). I have moved the viewing controls to W,E,R,T,Y, and U (for no particular reason) Extras: I implemented two environmental elements which are created with some randomness each time the program is launched. Firstly a collection of cubes are placed at slightly varying hights and randomized y rotaions, they are colored slightly different shades of green. Originally I was going to try and make thousands of little tiny strips (like grass) but I very quickly found out that this is a very expensive operation. The trees are of specified hight and location. Their trunks are drawn recursively and the top parts are randomly colored flattened squares rotated to random angles to form a kind of sphrical tree top. Both of these operations are very costly and I have tried them out in an attempt to create some semblance of a natural environment using cubes (which is very hard!) In the future with spheres and some texture mapping I think building a realistic environment will be much less processor intensive and will involve less geometric shapes. In order to minimize the cost of this environment I have placed the entire environment in a display list that is created only once. I have also included the ability to turn off the environment. Some issues I came accross: Because I didnt really know how body parts interacted originally I tried out a variety of solutions to all aspects of this project to gain some intuition. I used deformed cubes for almost all of my body parts and thus required more specific implementations for many of the body parts, as a result there is less code reuse than I would implement if I was to do it again. I have discovered that the essential properties I required for all body parts were angles of rotation and orientation to their parents. If I was to start fresh I would build the creature in such a way that it would be a class unto itself that would accept an array of pointers to joint control doubles. Within the class structure I would have a setup method that created all the body parts from some geometric class that could report back it's current position so that I could have implemented some kind of rudimentary collision detection. I tried to experiment with all sorts of things in this project and so there is not a lot of consistency from animation to animation as I was trying to find better ways of doing things, this is also one of the reasons I coded the jump cuts largly as their own methods, so that I could try a totally different approach to the articulations required. Also I did some things (like making each tail joint and toe seperately, with an eye to implement more complex motions that I did not get around to because I was screwing around making trees and stuff. I worked really hard on this project and feel I learned a lot from my first exposure to openGL and graphics programming in general. I think I should get all the extra marks possible, because I implemented extra motion, functionality and interesting environmental stuff and built my armadillo in an unusual way from the start which required more careful application of modeling transformations. Also my head was more complex in initial design then required.