Stick Sketch
Stick Sketch is my final project for the intro to computer graphics course at Cal Poly. Its purpose is to allow user to generate and position stick figures in desired configurations through keyboard keys. The goal of the tool is for the user to configure the location and positions of the limbs of a stick figure to a desired position and then save the frame. Once enough frames are saved the user can play them back to generate an animated stick figure. The user can also save the accumulated frames to a file where they can work on it later or reload it for later viewing.
Summary
The stick figure generated in the tool is created by hierarchically modelling transformed and scaled spheres. The joints were rotated using quaternion instead of euler angles.
Concepts Used
- Hierarchical Modelling
- Quaternions
- Data serialization
Demo
Dance
Bowing
Controls
- hold w, a, s, d :: for moving the camera through the world
- number keys 1, 2, 3, ....9, 0, -, = :: correspond to different joints in a currently selected stick figure
- z :: increase x angle on joint
- ctrl-z :: decrease x angle on joint
- x :: increase y angle on joint
- ctrl-x :: decrease y angle on joint
- c :: increase z angle on joint
- ctrl-c :: decrease z angle on joint
- left arrow key :: rotate selected stick figure to left
- right arrow key :: rotate selected stick figure to right
- ctrl-d :: revert position of stick figure to the last saved frame for the current stick figure selected
- ctrl-s :: save to file
- ctrl-alt-s :: save to new file
- ctrl-n :: add an additional stick figure to the scene
- ctrl-p :: playback saved frames
- ctrl-space :: toggle to next stick figure
- esc :: to exit
Libraries
- Boost - C++ library used to serialize data to save into a file
- Unix installation instructions: http://www.boost.org/doc/libs/1_55_0/more/getting_started/unix-variants.html
- Windows installation instructions: http://www.boost.org/doc/libs/1_55_0/more/getting_started/windows.html#errors-and-warnings
- GLFW
- GLM
- GLEW
Sources
- Quaternion research:
- http://www.opengl-tutorial.org/intermediate-tutorials/tutorial-17-quaternions/
- https://www.youtube.com/watch?v=mHVwd8gYLnI
- Boost: http://www.boost.org/doc/libs/1_36_0/libs/serialization/doc/index.html
- Smooth sphere: http://www.turbosquid.com/