Reference no: EM133009447
311170030 Introduction to Computer Graphics
Project 1: Creating a 2D Scene
I. Introduction
This first programming assignment will introduce you to the OpenGL graphics programming interface. In this programming assignment, you will be creating different 2D objects to model interesting shapes. The objective of this assignment is to apply your understanding of the computer graphics theories and give you an introduction to the OpenGL programming library.
Your goal is to design a 2D space, which consists of at least five different geometric primitives, such as the point, line, triangle, square, polygons, curves, circles and etc. And you should change the attributes of above primitives, such as the line type or width, filling pattern, anti-aliasing, etc. Besides, you should be able to apply arbitrary transformations - translation, rotation, scaling - to them. The user should be able to use the keyboard (and/or the mouse) to translate, rotate, and scale the object. After you have implemented all the basic functionality, we expect you to construct an interesting background with your program.
II. Implementation Details
In this assignment package, we have provided you with a template program (i.e., submit.c) that includes the necessary functions you are going to use and callback functions in the GLUT interface toolkit. Use this template as the basis for your implementation. There is also a file (i.e., readme.txt) indicating the keyboard usage of the demo program (i.e., demo.exe) for the users. You may design your own function to process the keyboard events, but you should also submit a file like this to specify the keyboard (and/or mouse) events you designed in your program. Otherwise, the mark for related items will be deducted.
All programs should meet reasonable programming standards: header comment, in-line comments, good modularity, clear printout, efficiency.
Constraints:
1. Draw at least five different geometric primitives in the 2D space;
2. Could change the attributes of above primitives by the keyboard event;
3. Create at least 5 and at most 10 keyboard or mouse events;
4. Design diverse objects transformations, such as rotation, translating, scaling;
5. Set interesting material properties to different objects.
Non-constraints
You are free to add objects, move them, deal with their material attributes, and whatever you wish to make your scene interesting.