THE AUSTRALIAN NATIONAL UNIVERSITY Final Examinations (Semester 2) COMP4610/COMP6461 (Computer Graphics) Final Exam

Similar documents
THE AUSTRALIAN NATIONAL UNIVERSITY Final Examinations(Semester 2) COMP4610/COMP6461 (Computer Graphics) Final Exam

2015 Semester 1 - Final Examination Paper B. Software Construction (COMP2100/COMP2500/COMP6442)

Sample Examination. Software Construction (COMP2200/COMP2500/COMP6442)

CS 4620 Program 3: Pipeline

Lets assume each object has a defined colour. Hence our illumination model is looks unrealistic.

Comp 410/510 Computer Graphics. Spring Shading

Queen s University CISC 454 Final Exam. April 19, :00pm Duration: 3 hours. One two sided aid sheet allowed. Initial of Family Name:

Computer Graphics Coursework 1

Blue colour text questions Black colour text sample answers Red colour text further explanation or references for the sample answers

Orthogonal Projection Matrices. Angel and Shreiner: Interactive Computer Graphics 7E Addison-Wesley 2015

CS 4620 Midterm, March 21, 2017

Models and Architectures

Assignment 2 Ray Tracing

Midterm Exam Fundamentals of Computer Graphics (COMP 557) Thurs. Feb. 19, 2015 Professor Michael Langer

Shading I Computer Graphics I, Fall 2008

Lighting. To do. Course Outline. This Lecture. Continue to work on ray programming assignment Start thinking about final project

Topics and things to know about them:

Interactive Real-Time Raycasting

Computer Graphics Tick 1

CS559 Computer Graphics Fall 2015

Illumination & Shading

The feature set you are required to implement in your ray tracer is as follows (by order from easy to hard):

TDA361/DIT220 Computer Graphics, January 15 th 2016

Computer Graphics. Lecture 13. Global Illumination 1: Ray Tracing and Radiosity. Taku Komura


CS 381 Computer Graphics, Fall 2008 Midterm Exam Solutions. The Midterm Exam was given in class on Thursday, October 23, 2008.

COMP 4801 Final Year Project. Ray Tracing for Computer Graphics. Final Project Report FYP Runjing Liu. Advised by. Dr. L.Y.

Homework #2. Shading, Ray Tracing, and Texture Mapping

CS559 Computer Graphics Fall 2015

Institutionen för systemteknik

The University of Calgary

Consider a partially transparent object that is illuminated with two lights, one visible from each side of the object. Start with a ray from the eye

6.837 Introduction to Computer Graphics Final Exam Tuesday, December 20, :05-12pm Two hand-written sheet of notes (4 pages) allowed 1 SSD [ /17]

521493S Computer Graphics. Exercise 3

The exam begins at 2:40pm and ends at 4:00pm. You must turn your exam in when time is announced or risk not having it accepted.

Ray Tracing Part 1. CSC418/2504 Introduction to Computer Graphics. TA: Muhammed Anwar & Kevin Gibson

Today. Rendering algorithms. Rendering algorithms. Images. Images. Rendering Algorithms. Course overview Organization Introduction to ray tracing

Lecture 15: Shading-I. CITS3003 Graphics & Animation

CEng 477 Introduction to Computer Graphics Fall 2007

CHAPTER 1 Graphics Systems and Models 3

CS 130 Exam I. Fall 2015

Computer Graphics. Shadows

Graphics for VEs. Ruth Aylett

Pipeline Operations. CS 4620 Lecture Steve Marschner. Cornell CS4620 Spring 2018 Lecture 11

WHY WE NEED SHADING. Suppose we build a model of a sphere using many polygons and color it with glcolor. We get something like.

Ray Tracing COMP575/COMP770

Photo Studio Optimizer

Homework 3: Programmable Shaders

TDA362/DIT223 Computer Graphics EXAM (Same exam for both CTH- and GU students)

Computer Graphics. Lecture 10. Global Illumination 1: Ray Tracing and Radiosity. Taku Komura 12/03/15

Ray Tracing. Kjetil Babington

The exam begins at 2:40pm and ends at 4:00pm. You must turn your exam in when time is announced or risk not having it accepted.

Photorealistic 3D Rendering for VW in Mobile Devices

Computer Graphics. Shading. Based on slides by Dianna Xu, Bryn Mawr College

COS 116 The Computational Universe Laboratory 10: Computer Graphics

Problem Set 4 Part 1 CMSC 427 Distributed: Thursday, November 1, 2007 Due: Tuesday, November 20, 2007

Pipeline Operations. CS 4620 Lecture 14

Shading. Why we need shading. Scattering. Shading. Objectives

Ray Tracer Due date: April 27, 2011

Assignment 6: Ray Tracing

CS 325 Computer Graphics

Ray-Tracing. Misha Kazhdan

CSE Intro to Computer Graphics. ANSWER KEY: Midterm Examination. November 18, Instructor: Sam Buss, UC San Diego

OpenGl Pipeline. triangles, lines, points, images. Per-vertex ops. Primitive assembly. Texturing. Rasterization. Per-fragment ops.

OpenGL Lighting Computer Graphics Spring Frank Palermo

CSE 167: Introduction to Computer Graphics Lecture #5: Rasterization. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2015

CENG 477 Introduction to Computer Graphics. Ray Tracing: Shading

CS 488. More Shading and Illumination. Luc RENAMBOT

-=Bui Tuong Phong's Lighting=- University of Utah, but with shaders. Anton Gerdelan Trinity College Dublin

Review for Ray-tracing Algorithm and Hardware

Computer Graphics. Lecture 14 Bump-mapping, Global Illumination (1)

CSE 167: Lecture #8: Lighting. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2011

Deferred Rendering Due: Wednesday November 15 at 10pm

graphics pipeline computer graphics graphics pipeline 2009 fabio pellacini 1

Computer Graphics 10 - Shadows

Today. Rendering algorithms. Rendering algorithms. Images. Images. Rendering Algorithms. Course overview Organization Introduction to ray tracing

Computer Graphics I Lecture 11

graphics pipeline computer graphics graphics pipeline 2009 fabio pellacini 1

Lecturer Athanasios Nikolaidis

CS230 : Computer Graphics Lecture 4. Tamar Shinar Computer Science & Engineering UC Riverside

CS 130 Exam I. Fall 2015

Recollection. Models Pixels. Model transformation Viewport transformation Clipping Rasterization Texturing + Lights & shadows

Lecture 17: Shading in OpenGL. CITS3003 Graphics & Animation

CS452/552; EE465/505. Intro to Lighting

PROFESSIONAL. WebGL Programming DEVELOPING 3D GRAPHICS FOR THE WEB. Andreas Anyuru WILEY. John Wiley & Sons, Ltd.

COMP371 COMPUTER GRAPHICS

Introduction to Computer Graphics with WebGL

CS 130 Final. Fall 2015

OUTLINE. Learn the basic design of a graphics system Introduce pipeline architecture Examine software components for a graphics system

Graphics for VEs. Ruth Aylett

CEng 477 Introduction to Computer Graphics Fall

Interactive Computer Graphics A TOP-DOWN APPROACH WITH SHADER-BASED OPENGL

Recall: Indexing into Cube Map

Real Time Rendering of Complex Height Maps Walking an infinite realistic landscape By: Jeffrey Riaboy Written 9/7/03

CPSC GLOBAL ILLUMINATION

Computer Graphics (CS 4731) Lecture 16: Lighting, Shading and Materials (Part 1)

GLOBAL EDITION. Interactive Computer Graphics. A Top-Down Approach with WebGL SEVENTH EDITION. Edward Angel Dave Shreiner

Mach band effect. The Mach band effect increases the visual unpleasant representation of curved surface using flat shading.

By: Tyler Spears Mentor: Dr. Bijaya Karki. Visualizing Time- Dependent Atomic Data in OpenGL

COS 116 The Computational Universe Laboratory 10: Computer Graphics

Transcription:

THE AUSTRALIAN NATIONAL UNIVERSITY Final Examinations (Semester 2) 2015 COMP4610/COMP6461 (Computer Graphics) Final Exam Writing Period: 3 hours duration Study Period: 15 minutes duration. During this time you may read text files and pdfs but you are not permitted to start answering questions, although, you are permitted to make notes on your scribble sheet. Permitted Materials: A4 page (one sheet) with notes on both sides Note the standard lab tools are available including: Java, eclipse, gedit, kate, dia, gcc,... The Java API is available at: file:///usr/share/doc/openjdk-7-jre-headless/api/index.html Please Read The Following Instructions Carefully. This exam will be marked out of 100 and consists of 5 questions. Questions are of unequal value. The value of each question is shown in square brackets. Questions that are partitioned into parts show the number of marks given to each part within square brackets. Students should attempt all questions. Answers must be saved into the question's directory (Q1, Q2, Q3, Q4, Q5) using the file(s) or software described in the question statement. If you do use eclipse then use the created projects for Q3, Q4, and Q5, as these have been set up to run the programs and access the correct files for saving your answers. Marks may be lost for giving information that is irrelevant. Q2 is different for students doing COMP4610 and COMP6461, only do the version of this question that corresponds to the course you are enrolled in. Network traffic may be monitored for inappropriate communications between students, or attempts to gain access to the Internet. 1/6

Question 1 Multiple Choice [40 marks] The multiple choice questions are available via a program in the 'Q1' directory. This program is also used for entering your answers. To run the multiple choice program either start it by double clicking the icon on the desktop or by starting it in a terminal. This is done by: opening a Terminal, from the command line change directory (cd) into the Q1 directory, and run the java MultipleChoice program. % cd ~/Q1 % java -jar MultiChoice.jar Your answers are automatically saved every time you press a button. Hence once you have completed your answers you can simply exit from the program (either by pressing the window closing x or by selecting the exit menu item). Note at any time you can restart the program and it will continue on from where you left off. Do not edit files in this directory. Also you can only have one instance of the MultiChoice program running at any one time. There are 20 questions. Each answer you get correct gains you 2 marks, each incorrect answer loses 0.5 marks. Questions left unanswered neither loses nor gains marks. If the question statement contains an underline, that is, then the selected answer should correctly complete the question statement. Some question statements may contain two underline sections, in which case the answer has two parts separated by a comma. The first part corresponds to the first underline section and the second part corresponds to the second underline section. 2/6

Question 2 Short Answer [10 marks] Highest marks are gained by providing clear, concise, and short answers. Save your answers in the file 'Q2Answers.txt' in the Q2 directory. Please make certain that this file is saved both as you progress through the exam and before the exam ends. COMP4610 Students Only i. [4 marks] Explain what Hierarchical Modeling is. Illustrate your explanation with an example. ii. [3 marks] When creating a 3D scene in OpenGL the standard fixed pipeline makes use of the modelview matrix and projection matrix. What purpose do these two matrices serve? How should these matrices be used to set up a scene? iii. [3 marks] Would it be possible to just set the GL_PROJECTION matrix to the identity matrix and then do all your transformations (including the projection transformations) in the GL_MODELVIEW matrix? Explain. COMP6461 Students Only i. [4 marks] Define and describe the following terms: raycasting, raytracing, global illumination, and photon mapping. ii. [3 marks] What are some differences you would observe in a scene between one rendered using raycasting compared to one rendered using raytracing? What are some observable differences if the rendering makes use of photon mapping. iii. [3 marks] Modern GPU hardware has become very efficient at rendering a huge number of triangles enabling it to create realistic scenes in real time. Also the computational power of GPUs has started to make some approaches, such as raytracing and photon mapping, viable for the real time rendering of scenes. Are these approaches suited to modern GPU hardware? Will approaches such as raytracing and photon mapping dominate real time rendering in the future? Explain and justify your answer. 3/6

Question 3 Lab [20 marks] The Q3 directory contains DrawIt.java, ToolBar.java, and DrawArea.java. These form a simple drawing program. Compile and run them ("javac *.java; java DrawIt"). When you drag the mouse around the window single pixels will be marked by the dragging action. Modify the code such that it draws a continuous line as you drag the mouse around. Add selection radio buttons (like the colour radio buttons) that enables you to change the thickness of the lines drawn. 4/6

Question 4 Lab [20 marks] The Q4 directory contains the code for the ray-tracing lab. Modify the 'raytrace' method in 'Scene.java' such that it's illumination model includes ambient, diffuse and specular lighting. The diffuse and specular lighting must be from a directional light source. You should adjust lighting parameters such that ambient, diffuse and specular effects are viewable. Add a comment to each statement you add to the code to explain what that statement does (place these comments in Scene.java above the added statement). Hints: The equation for the Phong reflection model is: I p =k a i a + lights (k d ( L.N )i d + k s (R.V ) α i s ) where L is the unit vector pointing at the light source, N is the unit vector normal to the surface, V is the unit vector pointing at the viewer, R is the reflection on the surface from the light source (also a unit vector), alpha is the shininess, k a, k d, and k s are reflection constants, i a, i d, and i s are light intensities. You would normally calculate each colour channel separately. k a and k d would normally come from the surface's colour and be the same, k s can just be set to white. Get each lighting aspect working separately and then combine them. Clamp the colour values. 5/6

Question 5 Lab [10 marks] Note: part marks in these questions may be gained for partial working solutions or just a viable description of how you would approach such a problem. These questions relate to question Q3 and Q4 respectively, you may copy code from your previous answers however you must have your answer to this question completely in the Q5 directory (similarly the answer to Q3 and Q4 must be complete within their respective directories). Do only ONE of the following two options: A) When drawing curved lines with the DrawIt program you don't end up with particularly smooth lines, this is especially the case when you drag the mouse quickly around the screen. Extend the DrawIt application such that the lines are drawn more smoothly. In your extension you must use the blending approach described below and you must address the problem that you need to be able see the curve as it is drawn (you don't want a gap between the pen and the 'ink' flowing from it) yet you don't know the shape of the curved line as it is drawn (this is because the blending function uses the next point after the current point to determine the shape of the line between the current and previous point). This problem can be addressed by using an image buffer to draw a temporary line onto, this image buffer can be shown to the user as the line is drawn. Once the line is complete it can be smoothed out and drawn onto the main image buffer. The blending function simply takes a weighted average of the surrounding points. So if we assume dragging the mouse creates a sequence of points p 0, p 1, p 2,. p n. Then the curve between point p i and p i+1 can be inscribed by the blending function: p(u)=( 1 u 4 ) p i 1+( 2 u 4 ) p i+( 1+u 4 ) p i+1+( u 4 ) p i+2 where we varying u for 0 to 1. Note this curve will not necessarily pass through the control points. Generally we want the lines to start at the first point in the sequence and end at the last point, so rather than have different blending functions for the first and last sections of the curve, simply duplicate the first and last points in the sequence a few times. B) The ray-tracer currently only renders spheres. Your task is to add to it the ability to render textured rectangles. The raytracing code is available in the Q5 directory. Note your solution for question 5 must be placed completely within this Q5 directory. You don't need to add the lighting model from the previous question into this extension. The basic raytracing code has been enhanced to include the Surface interface, the Intersect class, the Texture class, and the Rectangle class. Read over the code for these so that you can understand what they are doing. The only method you should need to modify is the intersect method in the Rectangle class. Currently this always returns null, as if rays never hit the rectangle. Add to this function such that when a ray does hit the rectangle an Intersect object is returned. This object contains the distance the ray traveled and the color of the surface that the ray hits. In this case the colour needs to be looked up from the texture. Don't modify the fields or constructor of the Rectangle code, once your intersect method is working correctly you should see the computer graphics logo spinning on its top edge. An example of one frame is given in the diagram to the right. To make this task a little simpler the cross product has been added to the P3D class. 6/6