Week Four
Frames, Transformations and Rotation Sequences
Slides from class
Reading: Matrix Tutorial
Reading: Quaternion Tidbit
Reading: GFX Reference
Reading: GFX Source
Coding Assignment: Compose transformations by pushing and popping your matrix stack, or multiplying your frames together.
Many examples are below. For instance, you could create single mesh and then in your render function, you could iterate 100 times, changing the matrix stack each time:
You could also experiment with relative transformations of frames. This is accomplished by multiplying frames together with the mult
method.
Please review the following examples:
Matrix Stack-based Pushing and Popping (just using Scene’s Matrix Stack)
Graphics: https://rawgit.com/wolftype/200c/gh-pages/scratch/webgl_gfx_frame_stack.html
Code: https://github.com/wolftype/200c/blob/gh-pages/scratch/webgl_gfx_frame_stack.html
Target (LookAt) (just using Mesh’s local Frames)
Graphics:https://rawgit.com/wolftype/200c/gh-pages/scratch/webgl_gfx_frame_target.html
Code: https://github.com/wolftype/200c/blob/gh-pages/scratch/webgl_gfx_frame_target.html
Relative Frame Transformations (just using Mesh’s local Frames)
Graphics:https://rawgit.com/wolftype/200c/gh-pages/scratch/webgl_gfx_frame.html
Code: https://github.com/wolftype/200c/blob/gh-pages/scratch/webgl_gfx_frame.html
Interpolation Between Frames (just using Mesh’s local Frames)
Graphics: https://rawgit.com/wolftype/200c/gh-pages/scratch/webgl_gfx_frame_interp.html
Code: https://github.com/wolftype/200c/blob/gh-pages/scratch/webgl_gfx_frame_interp.html
Euler Angles (just using Mesh’s local Frames)
Graphics: https://rawgit.com/wolftype/200c/gh-pages/scratch/webgl_gfx_frame_rotation.html
Code: https://github.com/wolftype/200c/blob/gh-pages/scratch/webgl_gfx_frame_rotation.html