Interactive Computer Graphics: Assignment 2


Topics:



Make the following modifications to Assignment 1:



  1. Enable double buffering.

  2. Implement the reshape callback function from lecture slides
  3. Place an ellipse in a SubWindow of the main window. Set the sub-window's display function to draw the background a different color.

  4. Create a menu on the sub window only that allows the user to change the subwindow's background color.

  5. Make the circle and triangle appear in a separate window entitled “window 2”. When this window is resized, its size should be drawn to the lower left hand corner of the window.

  6. Alter the main window so that if a user clicks on it with the left click button, a new circle, with a random color, appears where they clicked.

  7. Animate the shapes using the idle or timer function as follows:

    1. Make the squares rotate counter clockwise.

    2. Make the triangle rotate clockwise.

    3. Make the circles increase in size and then decrease in size as though it was “breathing”.

  8. Create a menu for the main window that is right-click activated with the following layout:

        Stop Animation
        Start Animation
        Square Colors ->
             White
             Red
             Green

Where each button does the indicated action.

        Movie of HW2 in action


Grading

  1. Double buffering: 0.5 point
  2. SubWindow: 1 point
  3. SubWindow menu: 1 point
  4. Second window: 1 point
  5. Resizing windows: 1 point
  6. Text in window: 1 point
  7. Adding circles: 1 point
  8. Animations, including start & stop: 2 points
  9. Main menu: 1.5 points

Last modified January 21, 2010.