Parameter Settings for Project 1
--------------------------------

This file contains various numeric parameter settings used in our
project. You are welcome to use these values in your program, but you
are encouraged to experiment with different values as well. (Remember
that, if you make use of any external resources, you must cite them in
your ReadMe file. Since this is not really external, you do not need to
cite this information.)

If any values appears to be missing, feel free to check with me.

Dave


Window and Drawing Canvas:
--------------------------
Window initial width/height (800, 600)

Canvas Height = 1
Canvas Width = (set to match window aspect ratio)

Colors:
-------
Background Color:
  If playing: (1, 1, 1) White
  If lost:    (0, 0, 0) Black

Text (after losing): (1, 1, 0) Yellow

Cannon: (0, 1, 0) Green
Ball: (1, 0, 0) Red
Droplet: (0, 0.75, 0.75) Medium Cyan

Keyboard Input:
---------------
'q' or Esc (ASCII code 27): quit
'f': toggle full screen mode (see glutFullScreen)
'r': restart game
'b': generate a random ball (used for debugging)
'p': pause/unpause
'a': move cannon left 0.20*(canvas width)
'd': move cannon right 0.20*(canvas width)
'+': speed up animation by 10%
'-': slow down animation by 10%

Mouse Input:
------------
Left button down - start shooting
Left button up - stop shooting
Cannon always points at mouse position

Cannon:
-------
Drawn as a rectangle of width 0.025 and length 0.10
Initial angle (CCW relative to x-axis): -90 degrees
Initial position: At midpoint of the upper edge

Fireball:
---------
Initial radius = 0.05
Velocity = 0.1 units per second
Max Hits (by droplets) before dying = 20
Fireball generation rate: R = 1

Notes: In our program, Fireballs are generated randomly at a rate of R
balls per second. At each idle event, let t denote the elapsed time
since the last idle event. The probability that a new fireball should be
generated now is max(1, R*t). (It is reasonable to assume that R is
small enough that R*t < 1.)

Each fireball is generated with its center at 0.05 units below the lower
edge of the canvas, so it appears rise up from the bottom edge. The
fireball center x-coordinates are randomly chosen so that each fireball
lies entirely within the window.

Each time a fireball is hit by a water droplet, it decreases in size by
1/20-th of its original size, that is, by 0.05/20. After 20 hits, when
its radius falls to 0, it is deleted.

Each fireball is drawn as a 20-sided regular polygon, and thus looks
pretty much like a circle.

Droplet:
--------
Radius = 0.005
Velocity = 0.50 units per second (in direction of cannon when fired)

Each droplet is drawn as an 8-sided regular polygon, and thus looks
pretty much like a circle.
