COS 426 Assignment 1
Introduction to OpenGL and Interaction
Due 1201 AM Friday September 29
In this assignment, you are required to learn enough
OpenGL to be able to draw on the screen and to read the mouse.
The minimal assignment will be to do just this.
Of course, you won't be satisfied with doing the minimal assignment
and will want to do more.
If you look in directory /u/cs426/OpenGL/book you will find a host of programs
that do all that is required here and much more. These accompany the
text OpenGL Programming Guide which you can access by typing
/usr/sbin/insight -v OpenGL_PG .
- Write a simple OpenGL program to draw a line
segment on the screen. Having mastered segments,
turn to the drawing of triangles, squares, polygons, ...
- Write a simple OpenGL program that first draws
a line segment and then changes the segment in
response to mouse clicks as follows:
- Left mouse clicks move the segment to the current mouse position.
- Middle mouse clicks rotate the segment about it's origin in
the direction of the mouse.
- Right mouse clicks change the length of the segment to be the
distance between the segment's origin and the current mouse
position.
- Write a simple OpenGL program to do ``mindless animation''.
Have two images and flicker between them. This works
best with a square given in two views, one rotated 45
degrees from the other.
- Extra credit: Redo problems 1-3 using interesting shapes
and interesting interactions with the goal of creating
an interesting animation.