CSC 461: Computer Graphics I (Fall 2006)

 

Programming Project 1

 

Due October 11, 2006

 

Exercise 2.15 and extension:

 

In OpenGL, we can associate a color with each vertex. If the endpoints of a line segment have different colors assigned to them, OpenGL will interpolate between the colors as it renders the line segment. It will do the same for polygons. Use this property to display

  1. The Maxwell triangle: an equilateral triangle whose vertices are red, green, and blue;

 

 

 

 

 

 

 

                                                     

  1. The color cube shown below, where each corner should be rendered as the specified color.

  

 

 

 

 

 

 

 

 

 

Note:

 

  1. Please comment your program as clear as possible.
  2. Submit your program by email to jhan@csudh.edu. Submitting a hardcopy is unacceptable.
  3. The printing result should also be attached when the code is submitted.
  4. The department PC lab is located at SCC 800 and is available for students to do CSC461 projects. Please check the lab open hours on the department web page at http://www.csc.csudh.edu/