CSCI 1300 - Extra Credit Program 5
Eyecon

This is an extra credit assignment worth a small amount of extra points (25). You should do this assignment if you finished the other work quickly. Last day to submit this to Dora is Tuesday, Oct 1. No late work accepted.


Warning: This extra credit work must be done entirely on your own. It is like a take-home exam. You cannot talk with anyone except the instructors, nor use other students' work. As such, if you choose to submit this work, you will be asked to accept the Student Honor Pledge:

"On my honor, as a University of Colorado at Boulder student, I have neither given nor received unauthorized assistance on this work."

Even one violation of this Honor Pledge will result in a grade of F for the entire course and possible additional sanctions from the campus Honors Code Committee.


Extra Credit Program 5:

A Note:

Please note that this page indicates precisely what your program should accomplish, without a precise indication of how the program works. Part of your assignment is designing the techniques of how the program works.

What the Program Should Do

This program use the winbgim library for graphics and mouse support.

When the program begins, it opens a graphics window that contains one elliptical eye with a round green iris inside. The iris follows the mouse whenever the mouse enters the graphical window. To be more precise: Whenever the mouse is in the window, the iris should move to an edge of its ellipse so that there is a straight line from the center of the ellipse through the center of the iris and on to the mouse pointer.

Also, whenever the user clicks the left mouse button inside the window, the center of the eye moves to the location of the click. And whenever the user clicks the right mouse button inside the window, the iris changes color.


Here is some of the mathematics that may help you:

  • Submission: Submit your .cxx file as Program 5 to www.cs.colorado.edu/~main/dora/ no later than Tuesday, Oct 1.