CS 621 Contemporary Computer Graphics


Homework 1, due Feb 2, 2009 ( Mon )

  1. ( 10 points ) Use OpenGL to draw a dot plot of the function f(x) = e-|x|sin ( 2πx ), where it is known that as x varies from xlow to xhigh, f(x) takes on values between from ylow to yhigh. Also draw the x-y axis with labels and ticks for your plot.

    By making use of viewports, display four different segments of f(x) on the four quadrants of the screen window along with their labeled axis.

  2. ( 20 points ) Use turtle graphics or/and other means to reproduce any five of the following images ( extra credit for extra reproduction ).
             
             

  3. ( 10 points ) Develop a routine that draws a sequence of tweens between two interested figures A and B as parameter t various gradually from 0 to 1, and then decreases gradually back to 0, thereafter repeating this cycle indefinitely, until a key is pressed. Tha animation shows A mutating into B and then back into A. Use double buffering offered by OpenGL to make the animation smooth. ( Note that A and B should have the same number of vertices. )

    Make a demo of your programs to the instructor before a class or during the office hours. Then for each programming problem, just submit comments on your program, stating if it compiles and work properly, and the techniques you have used. If you have not made the demo, submit the program along with sample outputs.