|
EXERCISES FOR WEEK
4
|
| week4-1 |
Write a function which accomplishes the task you just completed in the last exercise of week 3 (week3-10). That is, write a function
which takes two points as input, A and B, a real value for t, and then returns the point on the line through A and B for that particular value of t. Check your function by passing in points A and B as defined in exercise week3-10 and the values for t. |
| week4-2 |
In exercise 3-10, we end up plotting 6 points (including the two endpoints) on the line and increment between successive values for t is 0.2. In general, if you want to plot numframes points on the line segment from point A to point B, including the two endpoints, what is the value for increment that you would use?
|
| week4-3 |
Suppose you have an array of points, S, which contains all the vertices of the figure your animation should start with, and a second array of points, D, which contains all the vertices of the figure which is the destination of your animation. Assume there are numpoints points in each array. Write a function, FillTween, which takes as input:
and returns an array of points with numpoints points in it; each point calculated using corresponding points of S and D and calling the function Tween. |
| week4-4 |
Now write a function, DrawSequence, which takes as input:
and does the following:
|
| week4-5 |
Do practice exercise 4.2.1 (a,b,c) on page 140 of the Hill book.
|
| week4-6 |
Do practice exercise 4.3.1 on page 144 of the Hill book.
|
| week4-7 |
Multiply the following matrices (if possible):
and [B] = [2
|
| week4-8 |
What is the homogeneous scaling matrix MS if you wish to make the object twice as wide as it is now?
|
| week4-9 |
What is the homogeneous scaling matrix MS if you wish to make the object one-third as tall as it now is?
|