Intro Graphics January 29, 2006 G. Farin

Programming Assignment # 1 due: 2-13 percent of your your grade: 12.5

Compose a scene consisting of a traveling “star” and a “black hole.”

The star (a disc ≈ \frac{1}{20} of the extent of your window) should start at a random position and move in a random direction. Once it hits a window boundary, it will reflect off and continue. As it approaches the boundary, its color will change to bright orange and, after the bounce, return to its original color.

Somewhere inside your window, create a circle of radius ≈ \frac{1}{5} of the extent of the window (the “black hole”). This black hole should be colored slightly different from your window background color. If the star hits the perimeter of the black hole, it will start spiraling inward towards the center, gradually changing its color toward your window background color. After hitting the black hole center, it will randomly reappear in the window (again with the original color) and continue to travel.

Team work / extra credit: Make the black hole move, but at a lesser speed than the star. Or: make the star randomly reflect off the black hole sometimes and be sucked in other times.