CS 3014 Computer Graphics
Project #2
Points Possible: 100
Due: Wednesday, Septembr 29, 2010 by 9:00 am
Before You Begin:
- Have your version of TUGL library with at least functions for
- opening a Window, specifying a Frame, automatically opening a
viewport that preserves aspect ratio of the frame within the specified
window
- Review how to read in points from a file that are used in your design
- Make sure you have added a function for setting a viewport with respect to percentage of a normalized rectangle
- Know how to attach menus
Details:
Write a program that will draw a polyline figure
using points read in from a file. The figure will initally be
automatically centered in the window. Then the user will be
allowed to tile the window, using the polyline figure.
Your program should
10 pts:
Use functions from your TUGL collection to
- Open a window on the screen that is 800 pixels wide and 600 pixels tall
- Declare an appropriate frame for your polyline design. Your frame MUST be square.
10pts: Open your file of data points, read into an array or linked list. Make sure this will only be done
one time in your program.
20 pts: Draw the polyline design, automatically centered in the window so as to preserve aspect ratio.
10 pts: If the window is reshaped, it should automatically center the design again.
50 pts: Attach a menu
to the screen allowing the user to determine how many copies of the
design should be used to completely tile the window.
- 10 pts: 1 copy
- 10 pts: 4 copies
- 10 pts: 9 copies
- 10 pts: 16 copies
- 10 pts: 100 copies
Turn In:
Put everything in a Project 2 folder
and drop into the dropbox you and I alone share. Be sure to
include TUGL.h, TUGL.cpp, project2.cpp, makefile, and data file.
Do not submit any compiled code.
Extra Credit (20 points) (Due Friday)
Write a separate program that uses two different designs, or motifs,
to tile the window. See Case Study 3.6, part b, for
inspiration. You do not have to use curves, but may stick with
polylines. Your design should make sense
however; it should not be just two different images abutted
together but the design itself should be the result of using the two
images.