// Alison Wong // 78797990 // e2a3@ugrad.cs.ubc.ca // // CPSC 414 Project 1 // file: readme.txt Modelling: ========== Functions implemented: - drawSphere() : draw a unit sphere - drawCube(): draw a unit cube - drawBody(): draw body of the elephant this funcion calls drawTail(), drawLegL(x, y, z), drawLegM(x, y, z), drawLegN(x, y, z), drawLegO(x, y, z), and drawNeck() - drawTail(): draw tail of the elephant this function also draws a tail tuft for extra credits - drawNeck(): draw neck of the elephant this function calls drawHead() - drawHead(): draw head of the elephant this function calls drawTrunk(), drawEars(), drawTusk(), and drawEyes() - drawEyes(): extra credit: function that draws eyes of elephant - drawTusk(): extra credit: function that draws tusk of elephant - drawEars(): draw ears of the elephant - drawTrunk(): draw trunk of the elephant - drawLegL(x, y, z): takes in x, y, z position and draw the front anterior leg (legL) - drawLegM(x, y, z): takes in x, y, z position and draw the back anterior leg (legM) - drawLegN(x, y, z): takes in x, y, z position and draw the front posterior leg (legN) - drawLegO(x, y, z): takes in x, y, z position and draw the back posterior leg (legO) extra credits: drawTusk(), drawEyes(), tail tuft in drawTail() (worth 3 extra credit points) Animation: ========== Functions jump() and transition() are implemented to handle the jump mode and the transition mode. Both of the functions use switch case to handle animation of different part of the elephant. Functions I implemented: - jump(): handles all the animation in jump mode, use switch case to handle different part of the elephant - transition(): handles all the animation in transition mode, use switch case to handle different part of the elephant - tranTail(): handles transition of simple tail wag - tranHead(): handles transition of head nodding - tranTrunk(): handles transition of trunk curl under - tranLegL(): handles transition of rotating legL - tranLegM(): handles transition of rotating legM - tranLegN(): handles transition of rotating legN - tranLegO(): handles transition of rotating legO - tranEars(): handles transition of ears wiggle (for extra credit) - headTurn(): handles animation of the elephant turning its head sideways, while the trunk follows the head's movement - tailWag(): handles complex tail wag which the elephant's tail rotates around in a circular arc (for extra credit) - rest(): reset all the global variables such that the elephant returns to its rest pose (for extra credit) extra credits: tranEars(), headTurn(), tailWag(), rest() (worth 4 extra credit points) Interaction: ============ In the KeyboadCallback function, the user can interactively control the elephant: Key Function ======= ===================================================================== [q] Quit the program [s] side view of the elephant [f] front view of the elephant [b] back view of the elephant [a] top view of the elephant [u] bottom view of the elephant [r] reset view (the view when you first run the program) of the elephant [space] switch between transition mode and jump mode [t] simple tail wag where tail rotates up [h] head/neck nod [l] leg-L raise (front anterior leg) [m] leg-M raise (back anterior leg) [n] leg-N raise (front posterior leg) [o] leg-O raise (back posterior leg) [k] trunk curl under [e] ear wiggles [w] complex tail wag where tail rotates in a circular arc [x] head rotate sideways with the trunk following the head's movement [z] return to the elephant's rest pose (undo all animation)