Computer Graphics 308-557B


Due date: April 3.

Surface/Object Assignment
(Assignments that are late, but which arrive within 2 days (48 hrs) of the due date and time will be docked 20 per cent. Assignments later than that will not be accepted.)

For generic rules on assignment submission, see the rules page.

Submit your results using the handin program for the implementation (installed at the School of Computer Science) and on PAPER for the written work. Be sure to include sample output and test results for your implementations. It is you job to make a persuasive and convincing argument in writing for the quality and effectiveness of your programs! Check the FAQ for additional info.


Splines

Consider curves of the form Q(t) = T M G as discussed in class. Derive the basis matrix M for a curve where the geometry vector specifies: No implementation needed here.

Curve Drawing

In this question you will use openGL to draw splines. Read 8 values from the terminal in the order x1 y1 x2 y2 ... and use them to draw a cubic Bezier curve using openGL. When the user clicks the mouse read another 8 values and repeat, ad infinitum.

Quad-Trees

Implement a algorithm that takes a binary array (i.e. a bitmap) and encodes it as a quadtree. Read the array either as an ASCII table of blanks and non-blanks or as a pbm file (see man pbm), at your discretion. If you use an ASCII file you must accept it as a command-line argument and it should be assumed to contain N lines of N characters each, each line terminated by a newline (which does not count as one of the N characters). Yoour code should handle array of size at least 200x200.

As part of your output, indicate the depth of the tree and the total number of nodes. Try and indicate or depict the structure of the quadtree.