Due date: in class, 10 Dec. 1999.
Write your name, ID and cdf login on your written and electronic submissions.
You must answer both questions 1 and 2, and then one of questions 3 or 4.
as of Dec 6th, 1999.
Derive the basis matrix for this curve.
| Pa(t) = | (t3-2t, 2t3-t, t+1), | 0 <= t <= 1 |
| Pb(t) = | (t2-1, t3+1, 2t3+t+2), | 0 <= t <= 1 |
Create an interesting animation. Sample code is available at:
Creating an animation will involve the following steps:
Once you've created your animation, create a movie file, as follows:
"animXXX.ppm", where "XXX" is the frame number.
"mpeg.dat", and change the second line to read
"anim*.ppm [001-nnn]", where "nnn" is the
highest frame number recorded.
"mpeg_encode mpeg.dat" to create the movie.
cjpeg. The following script may help:
#!/local/bin/perl
for (1..60) {
system sprintf "cjpeg anim%03d.ppm > anim%03d.jpg",$_,$_;
}
If you do, you must change lines 2 and 4 of mpeg.dat .
Submit your source code and movie file with one of the following commands:
submit -N a3q3 csc418h anim.cpp anim.mpg
submit -N a3q3 csc2504h anim.cpp anim.mpg
Write a ray tracer which includes the following features:
Warning! Ray tracers can easily take hours to render a scene. For all renderings except your final scene, keep the size of your image very small (100x100).
You may use the solution to the previous assignment:
save_image
function from question 3 to save your image, and use xv
to convert the image to GIF format.
Submit your source code and image with one of the following commands:
submit -N a3q3 csc418h rt.cpp rt.gif
submit -N a3q3 csc2504h rt.cpp rt.gif