Parameters for the transformations can be supplied in one of two ways. (a) sliders, or (b) combination of buttons and mouse movements. Sliders are easier to implement though the interaction is indirect. One way to do this is have separate sliders for different translations along x, y, and z. Another set of sliders for specifying scaling factors along x, y, and z (be careful with scaling by 0). And yet another set of sliders for rotation amounts around the x, y, and z axes. That's a lot of sliders. Typically, this type of interaction supports scaling with respect to the current location of the object i.e. object changes volume in place without getting its center moved elsewhere. Also typical of slider interaction is rotation about the object's axes as opposed to the world axes. Rotations are also done in-place.
An alternative way is with direct manipulation similar to the drag-and-drop interface. Translation could be specified with left button down together with mouse movements. Scaling is usually done with middle button down together with mouse movements. Rotations can be done with right button and mouse movement. Since mouse movements are constrained to produce 2 values only (screen x and y movements) whereas our transformations require 3 values, some assumptions/tradeoffs need to be made. For example, scaling can be limited to uniform scaling, where the mouse movement to the right and/or up implies increasing the scale factor, and mouse movement to the left and/or down implies decreasing the scale factor. For translation, horizontal and vertical mouse movements can be mapped directly to x and y translations in world space. For z translation, perhaps the letter z need to be pressed in conjunction with mouse movements where the motions are similar to scaling. That is, translate positive z for right and/or up mouse movements, etc. For rotation, a combination of keyboard, button and mouse movements can be use to specify +/- in-place rotations about the three axes one at a time.
The header block should contain at least the following information: name, cruzid, date, and brief description of your program. This will be true for all future assignments and programs.
Rubric:
5 header blocks 5 code readability 10 inline comments 20 translation 20 scaling 20 rotation 20 cumulative transformation 20 bonus
This command should work from unix.ic.ucsc.edu.
Create and submit a subdirectory called prog3.
IT SHOULD CONTAIN ALL THE FILES NECESSARY FOR THIS PROGRAM TO RUN.
Tar or zip up prog3 before submitting.
Last modified Thursday, 07-May-2015 12:36:40 PDT.