Computer Graphics (CS 330)
Project No. 2 (15 points)
Problem:
-
To create a 3D image, consisting of three colored polygons, based on data
stored in a text file.
Task:
-
Create the following classes:
-
myPoint: data members include a coordinate triple (x,y,z) and a
pointer to myPoint objects
-
myPolygon: data members include a pointer to a list of myPoint objects,
the number of points (vertices) in the polygon, and the color of the polygon
stored as an RGB triple
-
Using C++, OpenGL and GLUT, and these classes, create a Win32 Console Application
program that will read a set of polygonal
data from a file and then render the polygons using perspective projection.
-
Produce three renderings of these polygons
-
Using the vertex data as given
-
Translating the third polygon by (0, 10, 50)
-
Scaling the second polygon by (-1, 2, 1)
-
Submit your project according to the Project
Submission Guidelines for this course.
Notes:
-
Keep it simple. Don't try to do more until you succesfully complete the
project as described above.
-
You do not need to use the DDA you created for Project No. 1.
-
You may use whatever window/viewport/point-of-view settings you wish as
long as all of the polygons are visible in the final rendered image.