Past Midterm and Exam Questions (PDF) - Student.cs.uwaterloo.ca ...
Past Midterm and Exam Questions (PDF) - Student.cs.uwaterloo.ca ...
Past Midterm and Exam Questions (PDF) - Student.cs.uwaterloo.ca ...
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
CS488/688 Introduction to Computer Graphi<strong>cs</strong> 21<br />
9.4 Hierarchi<strong>ca</strong>l Robot Arm [Last Used: Fall 1992 Final]<br />
We wish to model the robot arm depicted below. You are to design an appropriate display structure.<br />
Show the nodes, their hierarchy, <strong>and</strong> what purpose each node serves (e.g. rotation about z-axis or<br />
base object).<br />
The base (A) <strong>ca</strong>n rotate about the z axis. The post (B) <strong>ca</strong>n extend <strong>and</strong> retract along the z<br />
axis. It moves in <strong>and</strong> out of the base like a piston in a cylinder. The joint (C) <strong>ca</strong>n rotate about<br />
an axis parallel to the x − y plane (orientation depending on how the base has rotated). The angle<br />
that the upper arm (D) makes with the post is determined by the rotation of this joint. The lower<br />
arm (E) slides in <strong>and</strong> out along the upper arm, like a piston in a cylinder. The grippers (F) pivot<br />
at their ends of attachment to the upper arm.<br />
All components (A through E <strong>and</strong> both F’s) are formed by s<strong>ca</strong>ling a cylinder with unit diameter<br />
<strong>and</strong> unit height whose base is centered at the origin:<br />
z<br />
y<br />
x<br />
A has height h A <strong>and</strong> diameter d A , <strong>and</strong> similarly for all other components. In building your<br />
data structure, do not worry about restrictions on rotations or translations, since that would add<br />
too many compli<strong>ca</strong>tions for the time you have.<br />
z<br />
y<br />
C<br />
B<br />
D<br />
E<br />
F<br />
x<br />
A<br />
9.5 Cube Array [Last Used: Spring 1992 Final]<br />
Below is a data structure that, if properly walked <strong>and</strong> interpreted, will result in the display of 3<br />
rows each consisting of 3 copies of the cube represented by the node “C”. The nodes with a “T” label<br />
are translations. “T0” is the translation that takes (x, y, z) to (x, y − 4, z). “T1” is the translation<br />
that takes (x, y, z) to (x, y, z). “T2” is the translation that takes (x, y, z) to (x, y + 4, z). “T3” is the<br />
translation that takes (x, y, z) to (x − 4, y, z). “T4” is the translation that takes (x, y, z) to (x, y, z).<br />
“T5” is the translation that takes (x, y, z) to (x + 4, y, z). The “R” node is a rotation, <strong>and</strong> the “S”<br />
node is a s<strong>ca</strong>le.