Reference no: EM13836435
Computer Graphics
Major CG Programming Assignment
Aims
This assignment aims to develop students' competence in following aspects:
• to be able to design interesting 3D scenes,
• to be able to apply transformation techniques to construct and/or control the 3D scenes,
• to be able to apply 3D object representation techniques from B-Reps approach to model the objects, and
• to be able to implement the design and models in a C++ with OpenGL.
The detailed technical aspects covered by this assignment are as follows:
? Setting up 3D viewing systems with OpenGL functions (orthogonal and/or perspective),
? Creating 3D objects using OpenGL graphics primitives from the B-reps approach,
? Performing geometric transformations including translation, rotation and/or scaling transformations,
? Applying illumination models using OpenGL functions,
? Applying rendering techniques using OpenGL functions,
? Applying texture mapping techniques,
? Applying animation techniques using double buffering method, and
? Applying menu and mouse/keyboard functions to control the display of scenes.
It directly contributes to achieve the subject objectives 5, 6, 7 and 8, and graduate attributes B.5, C.1, C.2, E.1, E.2 and / or F.1, as stated in the subject outline.
Instructions
1. Academic conduct
Please refer to "Academic Standards" in the subject outline for the Academic Conduct statement. Participants are also reminded of the principles laid down in the "Statement of Good Practice and Ethics in Informal Assessment" in the Faculty Handbook.
The unacknowledged use of the ideas or graphics of others in your work is known as plagiarism and will not be tolerated and is totally unacceptable to the University.
Rumours of the practice of plagiarism damage the reputation of your degree and cause resentment among students who see that some people are gaining marks unfairly. If you do not do your own work you will not learn what you need to know for your profession, and this will become apparent to your employers and damage your career.
If you have to include a piece of code from the textbook or internet or other people, you must acknowledge the source in comments attached to the code segment.
2. This is a group assignment with individual components. You need to team up with another student. Within a group, each member will conduct Part 1 and the self-reflection in Part 3 individually and two members will work on Part 2 and the rest of Part 3 together. For some exceptional cases, it is allowed for you to work on your own, but you must accept the consequences in terms of time commitment and work load, as some of this assignment is designed for two people to complete within the given time frame. Each member will receive a mark for the individual-based parts and the same mark for the group-based parts. If you have trouble with the operation of an assignment group, you need to talk to the subject coordinator as soon as possible. Complaints about group member will not be heard on or after the submission date.
3. You need to sign a declaration form for Assignment to declare the submitted work is your original work (individual-based part) and joint original work with your partner (group-based parts). The signed declaration form needs to be enclosed into the hard-copy of your submission. Without the signed declaration forms, the assignment will not be marked. The declaration form can be found in the subject site in UTSOnline, 2015 Subject Materials?Specifications for Assessment Items? Declaration Form.
4. Estimated time of marking the assignments is about four weeks after the due day. The marked assignments can be picked up in person. The place where you can pick it up will be announced on the UTS announcement board. Only summative feedback (marks with marking sheets against marking criteria) will be provided.
5. Please take note of the due date, and work towards that date. Please don't leave the assignment until the last minute.
Late assignment submissions will incur a heavy penalty as stated on Page 7 in the subject outline:
"Without legitimate reasons, a late submission will attract a penalty of 20% of the student's maximum possible mark for each day (weekends are included) overdue. Assignments may not be submitted more than five days late under any circumstances."
6. Special consideration can be given for situations which are out of the applicant/student's control, such as serious health, personal, and unexpected work and family problems. In such cases, adequate supportive documentation must be provided.
The extension can be up to one week (maximum one week) after the official due date. Any application for a special consideration should go to the subject coordinator before the due date with adequate supportive documents.
Warnings: Assignment submission extensions will NOT be granted for any technical problems associated with the assignment.
7. The required time commitment for this assignment is about 35-50 hours per person.
8. Minimum requirement for being eligible to be assessed is to complete the Part 1.
Task Specifications
There are three parts in this assignment, which are an individual programming task, a group programming task and a report based on joint effort of group members.
Part 1-
Develop ONE C++ program to display an orthogonal view of two animated 3D objects with the following tasks:
Task 1: Build the scene with the following objects:
Object 1: The x, y and z axes of your world coordinate system with x axis in RED, y axis in GREEN and z axis in BLUE.
Object 2: A line segment defined by two endpoints: A(160.0, -50.0, -400.0) and B(160.0, -50.0, 200.0).
Object 3: One manually constructed tetrahedron or cube. The centre of their circumscribed circles is at the point (150.0, 80.0, -120.0).Their radius is 90 units.
Notes:
• You are not allowed to use OpenGL built-in polyhedron functions for Object 3;
• Two members in a group must select different polyhedrons for Object 3.
• Mathematical equations for calculating the vertices of these regular polyhedrons will be given later in a separate file.
Object 4: One GLU quadric surface, which can be a sphere, a cone, or a cylinder, i.e., you need to use OpenGL GLU built-in quadric surface functions to create Object 4. Use the point (150.0, 80.0, -120.0) as their reference points, i.e. as the centre of sphere and the centre of the bottom circle of cylinder or cone. The radius of sphere is 50 units. The radius of bottom circle of cylinder is 50 units. The radius of base circle is 50 units. The heights of cylinder and cone are 100 units.
Object 5: A local point light represented by a point with size 10, which locates on the line segment.
Note: The actual position of this light on the line segment AB needs to be adjusted to achieve appealing light effects in the scene.
Task 2: Animate Object 3 and Object 4 (one at a time) by rotating them around the given line segment (i.e. the rotation axis) using the double-buffer approach. Add a keyboard control to control the animation/r speed using letter "u" for increasing the speed and letter "d" for decreasing the speed. In addition, define a left-click menu, called "Object Menu", to select the animated object from the two objects (i.e. Object 3 and Object 4);
Task 3: Create two texture patterns. Texture 1 is a manually-constructed texture and Texture 2 is a texture converted from an input image.
Task 4: Map Texture 1 to Object 3 and Object 4 using the "BLEND" mode and Texture 2 to Object 3 and Object 4 using the "REPLACE" mode. Define a right-click menu, called "Texture Menu", to select from the following three options:
? No texture
? Texture 1
? Texture 2
Task 5: Define a sub-menu of "Object Menu", called "Colour Menu", to select one of the following colours as the object colour: yellow, cyan and magenta.
Part 2
Develop ONE C++ program to display the perspective view of UTS-FEIT building with the following tasks:
Task 1. Model construction
Write a C++ code segment to build a wireframe model of UTS-FEIT building using OpenGL built-in graphics primitives from the Boundary-Representation (B-reps) approach.
Task 2. Render the model with the following requirements:
? Use two OpenGL built-in rendering methods, i.e. the constant intensity method and Gouraud surface rendering method.
? Create two scenes: (i) a day-time scene with sunlight and (ii) a night-time scene with moon light and a number of local point lights (allocate one local point light around the middle of each curved edges as shown below:
Each light source should include ambient, diffuse and specular light components. The surface material should have ambient, diffuse and specular reflections.
Notes: In order to render the objects properly, you will have to calculate and specify the normal vector at each vertex, which is the average of surface normal vectors of all the meshes that share this vertex.
Task 3 (Bonus task) Add texture to the surfaces to make them look similar to the real UTS FEIT building surfaces. You can design your own texture patterns or borrow from other sources, e.g., internet (with proper referencing).
An image of UTS-FEIT building is shown below for your reference:
More images can be found from Google search using keywords "UTS FEIT building images".
Display requirements:
• Each object should be displayed in two versions which are a wire-frame version and a rendered version. Add a version of with texture if you have successfully attempted Task 3. Define a right-click menu, called "Version Menu", to switch between these versions.
• Allow the following three display options for the wireframe version: (i) "not show normal vectors", (ii) "show normal vectors of vertices" and (iii) "show normal vectors of surfaces" and use a right-click sub0menu of "Version Menu" to select each option.
• Allow the following two options: "constant intensity rendering" and the "Gouraud rendering" and use a right-click sub-menu of "Version Menu" to select each option
• Display should have correct depth-effects, i.e., you need to apply effective hidden surfaces/lines method(s).
• The rotation direction should be controlled by the letter "p" for rotation in CW direction and "n" for rotation in CCW direction.
Part 3 (Mixture of individual and group tasks)
Write a report about your development including the methods/algorithms used, final results, etc. and self-reflection about the work done in Parts 1 & 2.