Getting Started Assignment

Run barchart.c to display a 3D bar chart.

Make each of the following changes, write what you did, and answer any associated questions:

Make the animation move slower.

Change the window size to be 400 x 300 pixels (screen dots). Is the window more wide than tall or vice versa?

Place the window at position (0, 0).  Where is the origin on the screen?  What corner of the window is placed at the origin?

 Place the window at position (100, 200).  Does the 100 indicate the number of pixels to the right of or down from the origin on the screen?  Does the 200 indicate the number of pixels to the right of or down from the origin on the screen?

Change the name of the window to be the possessive of your name and “3D Bar Chart,” such as “J. D. Smith’s 3D Bar Chart”.

Change the colors of the bars to be only red, green, and blue.  Use all three colors.  glColor3f(0, 0, 1) indicates full blue.  All arguments are floating point numbers between 0 and 1.  The first number indicates the amount of red; the second indicates the amount of green; and the third, the amount of blue.

Drag the graphics window and notice how the drawing resizes.  What function is responsible for responding to the user’s manipulation of this window?

 Suppose the rectangular grid covers an area of a national forest and the height of each bar indicates the number of dogwood trees in that grid section.  The dogwood trees are threatened by blight.  We want to display the entire grid, pointing out the section with the fewest such trees, to indicate regions of particular concern.  Read the data from a file, and generate the graphic.