Spring 2012 Final. CS184 - Foundations of Computer Graphics. University of California at Berkeley

Similar documents
Module Contact: Dr Stephen Laycock, CMP Copyright of the University of East Anglia Version 1

Tentti/Exam Midterm 2/Välikoe 2, December

The University of Calgary

Topics and things to know about them:

Homework #2. Shading, Projections, Texture Mapping, Ray Tracing, and Bezier Curves

CS559 Computer Graphics Fall 2015

CS 130 Final. Fall 2015

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

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

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

Pipeline Operations. CS 4620 Lecture 14

CS 130 Exam I. Fall 2015

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

CHAPTER 1 Graphics Systems and Models 3

Course Title: Computer Graphics Course no: CSC209

Welcome to COMP 770 (236) Introduction. Prerequisites. Prerequisites

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

Computer Graphics I. Midterm Examination. October 23, This is a closed-book exam; only one double-sided sheet of notes is permitted.

For each question, indicate whether the statement is true or false by circling T or F, respectively.

CMSC427 Shading Intro. Credit: slides from Dr. Zwicker

CHETTINAD COLLEGE OF ENGINEERING & TECHNOLOGY CS2401 COMPUTER GRAPHICS QUESTION BANK

Topic 12: Texture Mapping. Motivation Sources of texture Texture coordinates Bump mapping, mip-mapping & env mapping

Pipeline Operations. CS 4620 Lecture 10

Homework #2. Hidden Surfaces, Projections, Shading and Texture, Ray Tracing, and Parametric Curves

Topic 11: Texture Mapping 11/13/2017. Texture sources: Solid textures. Texture sources: Synthesized

Topic 11: Texture Mapping 10/21/2015. Photographs. Solid textures. Procedural

Computer Graphics I Lecture 11

CS 559 Computer Graphics Midterm Exam March 22, :30-3:45 pm

Today. Global illumination. Shading. Interactive applications. Rendering pipeline. Computergrafik. Shading Introduction Local shading models

CS2401 COMPUTER GRAPHICS ANNA UNIV QUESTION BANK

Interpolation using scanline algorithm

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

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

CS 4600 Fall Utah School of Computing

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

CS 130 Exam I. Fall 2015

Introduction Rasterization Z-buffering Shading. Graphics 2012/2013, 4th quarter. Lecture 09: graphics pipeline (rasterization and shading)

CMSC427 Advanced shading getting global illumination by local methods. Credit: slides Prof. Zwicker

CS 4620 Midterm, March 21, 2017

Exercise Max. Points Total 90

Introduction Ray tracing basics Advanced topics (shading) Advanced topics (geometry) Graphics 2010/2011, 4th quarter. Lecture 11: Ray tracing

Mathematical Tools in Computer Graphics with C# Implementations Table of Contents

CMSC427 Final Practice v2 Fall 2017

Lahore University of Management Sciences. CS 452 Computer Graphics

Rendering. Illumination Model. Wireframe rendering simple, ambiguous Color filling flat without any 3D information

CS380: Computer Graphics Introduction. Sung-Eui Yoon ( 윤성의 ) Course URL:

CS123 INTRODUCTION TO COMPUTER GRAPHICS. Describing Shapes. Constructing Objects in Computer Graphics 1/15

Computer Graphics: Programming, Problem Solving, and Visual Communication

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

Institutionen för systemteknik

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.

OXFORD ENGINEERING COLLEGE (NAAC Accredited with B Grade) DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING LIST OF QUESTIONS

Objectives. Introduce Phong model Introduce modified Phong model Consider computation of required vectors Discuss polygonal shading.

[175 points] The purpose of this assignment is to give you practice with shaders in OpenGL.

TDA361/DIT220 Computer Graphics, January 15 th 2016

CS GAME PROGRAMMING Question bank

EECS 487, Fall 2005 Exam 2

CS337 INTRODUCTION TO COMPUTER GRAPHICS. Describing Shapes. Constructing Objects in Computer Graphics. Bin Sheng Representing Shape 9/20/16 1/15

CS 325 Computer Graphics

Shading and Illumination

SRM INSTITUTE OF SCIENCE AND TECHNOLOGY

Intro to Ray-Tracing & Ray-Surface Acceleration

End-Term Examination

Introduction to Computer Graphics. Farhana Bandukwala, PhD Lecture 14: Light Interacting with Surfaces

Today. Global illumination. Shading. Interactive applications. Rendering pipeline. Computergrafik. Shading Introduction Local shading models

CS 563 Advanced Topics in Computer Graphics Lecture 2: Bare-Bones Raytracer. by Emmanuel Agu

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.

Illumination and Shading

TSBK 07! Computer Graphics! Ingemar Ragnemalm, ISY

9. [20 points] A degree three Bezier curve q(u) has the four control points p 0 = 0,0, p 1 = 2,0, p 2 = 0,2, and p 3 = 4,4.

Final Exam CS 184: Foundations of Computer Graphics! page 1 of 12!

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

INFOGR Computer Graphics. J. Bikker - April-July Lecture 10: Shading Models. Welcome!

Lahore University of Management Sciences. CS 452 Computer Graphics

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

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

Deferred Rendering Due: Wednesday November 15 at 10pm

Illumination Models & Shading

CENG 477 Introduction to Computer Graphics. Ray Tracing: Shading

6.837 Introduction to Computer Graphics Assignment 5: OpenGL and Solid Textures Due Wednesday October 22, 2003 at 11:59pm

Midterm Exam CS 184: Foundations of Computer Graphics page 1 of 11

Photorealism: Ray Tracing

Computer Graphics CS 543 Lecture 13a Curves, Tesselation/Geometry Shaders & Level of Detail

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

782 Schedule & Notes

Radiance. Radiance properties. Radiance properties. Computer Graphics (Fall 2008)

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

Information Coding / Computer Graphics, ISY, LiTH. Splines

Illumination and Shading

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]

Reading. 18. Projections and Z-buffers. Required: Watt, Section , 6.3, 6.6 (esp. intro and subsections 1, 4, and 8 10), Further reading:

Lecture 15: Shading-I. CITS3003 Graphics & Animation

CS 4620 Final Exam. (a) Is a circle C 0 continuous?

CMSC 435/634: Introduction to Graphics

CS 464 Review. Review of Computer Graphics for Final Exam

The Traditional Graphics Pipeline

Problem Max. Points Total 80

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

Computer Graphics 1. Chapter 7 (June 17th, 2010, 2-4pm): Shading and rendering. LMU München Medieninformatik Andreas Butz Computergraphik 1 SS2010

How do we draw a picture?

Transcription:

Spring 2012 Final CS184 - Foundations of Computer Graphics University of California at Berkeley Write your name HERE: Write your login HERE: Closed book. You may not use any notes or printed/electronic materials. No calculators. In class, 3 hours. 22 pages: 1 cover, 21 question pages. Question Points Score 1. Transformations 20 2. OpenGL Shading 20 3. Bezier Curves 20 4. Ray Tracing 20 5. Basic Illumination and Radiometry Concepts 20 6. Additional Topics 20 You are encouraged to first look over all of the questions, in order to budget your time appropriately. If you are unsure of your answer (or even otherwise) please show your work so you can get partial credit. Additional worksheets if needed are on the final pages. 1

1. Transformations [20] Consider a unit radius circle in the Z= 0 plane centered at the origin. (i.e. it is a unit circle in the X-Y plane) Consider a particular point P at an angle of 45 degrees in polar coordinates, i.e., at (1/ 2, 1/ 2, 0). Since it is a circle, the unit normal N at that location is also (1/ 2, 1/ 2, 0). We go through a number of transformations. For each, please draw the resulting shape and the new location P' of point P, as well as the new normal N' at P'. (That is, draw the transformed shape, and mark P', N'). Also, please write down the formulae for (i) The 4x4 transformation Matrix for Positions, (ii) The new point P', (iii) the new normal N'. The answers to parts a-d are all separate; the transforms are not applied in order (except that c combines a and b). 2

a) Translation by +3 units along the X axis. (i) Transformation matrix (ii) P' (iii) N' (iv) Your transformed shape for positions b) Rotation by 45 degrees (about the Z axis) (i) Transformation matrix for positions (ii) P' (iii) N' (iv) Your transformed shape 3

Work sheet 4

c) First the translation (a) followed by the rotation (b) (i) Transformation matrix for positions (ii) P' (iii) N' (iv) Your transformed shape d) A scale by a factor of 2 along the x axis (unit scale along y and z). (i) Transformation matrix for positions (ii) P' (iii) N' (iv) Your transformed shape 5

2. OpenGL and Shading [20] a) There are three basic shading modes in OpenGL: Flat Shading, Gouraud Shading and Phong Shading. Briefly explain each of these and the differences between them. What are the advantages and disadvantages of each (just a brief explanation; formulas are not required but may help to make the point). For Gouraud shading, what operations are typically performed in the vertex shader, OpenGL rasterizer, and fragment shader respectively? For Phong shading, what operations are typically performed in the vertex shader, OpenGL rasterizer, and fragment shader respectively? 6

b) What is the Lambertian or Diffuse Illumination Model? What is the formula that is typically implemented in OpenGL? c) What is the Phong Illumination Model for specular highlights? Please explain how the Phong Illumination Model is different from the Phong shading model in part (a), and how they are usually combined? What is the formula for specular highlights (Phong Illumination Model) that is typically implemented in OpenGL? d) Name at least one other reflection model besides Lambertian and Phong above, and give at least an outline of the relevant shading formula. (This is not implemented by default in old-style OpenGL but can be implemented with programmable shaders). 7

3. Bezier Curves [20] (Extra Credit for cubic curve) Bezier curves are commonly used to approximate shapes. In this question, we consider quadratic and cubic Bezier curves used to approximate a quarter circle, i.e. an arc that starts at (0,1) and ends at (1,0). Remember that the Bezier curve interpolates the end-points of the control polygon and the control polygon is also tangent to the curve at these end points. (0,1) First consider a quadratic Bezier approximation to the quarter circle. a) What are the control points of the Bezier curve? (0,0) (1,0) b) What is the mid-point? c) What is the maximum error? (i.e. the difference between the mid-point and the mid-point of the quarter circle). 8

Work sheet 9

d) What is the corresponding quadratic B-Spline curve that best approximates the quarter-circle, i.e. what are its control points? What is the error for this curve? Is it the same or different from the Bezier curve? 10

e) [Extra Credit] Now, consider a cubic Bezier curve. In this case, besides position/tangency constraints at the end-points, we also require the curve position and tangent to match at the mid-point. What are the control points of the cubic Bezier curve that approximates the quarter circle? f) [Extra Credit] What is the maximum error of the cubic Bezier approximation and how does it compare to the quadratic? 11

Work sheet 12

Work sheet 13

4. Ray Tracing [20] We step through the various stages of intersecting a ray with a transformed sphere. Consider an ellipsoid centered a (0,2,0) on the Y-axis, and with radius along Y being 2 units and along X and Z being one unit. That is, we took the unit sphere, scaled it by a factor of 2 in Y and then translated by 2 units in Y. We have a ray that starts at the location (1,0,0) and has direction (-1, 2, 0). a) Write down the 4x4 transformation matrix for this transform to the sphere. Transformation Matrix b) How would you intersect the ray against the transformed sphere by using a standard raysurface intersection test? Write down the transformed ray. 14

Work sheet 15

c) What is the general equation for ray-sphere intersection, given the transformed ray and the canonical sphere? Note that the form of the ray is p = p 0 + td where p 0 is the origin and d the direction, while t is a parameter along the ray. The equation for the sphere is (p p c ) (p p c ) = r 2, where p c is the center of the sphere and r is the radius. d) What is the intersection point in (i) the transformed space and (ii) the original (untransformed object: ellipsoid) space? (i) (ii) 16

Work sheet 17

e) What is the surface normal in (i) the transformed and (ii) the original (untransformed object: ellipsoid) space? (i) (ii) f) [Extra Credit] What is the reflected ray direction in (i) the transformed and (ii) the original (untransformed object: ellipsoid) space? (i) (ii) 18

Work sheet 19

5. Basic Illumination and Radiometry Concepts [20] a) Define the terms Radiance, Irradiance and BRDF, and give the units for each. b) Write down the local reflectance equation, i.e. express the net reflected radiance in a given direction as an integral over the incident illumination. Prominently label the main terms of the equation such as the BRDF. 20

c) If the radiance from every point in the upper hemisphere is 1 W/(m 2 sr), what is the irradiance at a point? (Use correct units) d) What is the rendering equation? Give a brief description, and write down a formula for it, labeling each of the individual terms. (No derivation is needed, just the final form) 21

6. Additional Topics [20] a) What is standard (whitted-style) recursive ray-tracing? What visual effects does it allow for, that are hard to achieve in OpenGL? b) What is aliasing? Are the jaggies when rasterizing (or ray tracing) the sharp edge of a triangle related to aliasing? What is one way of reducing aliasing or antialiasing? 22

c) Texture mapping can be used for many visual effects besides a simple color modulation. Name three possible uses for textures, or other visual effects that can be obtained from texture maps. d) Briefly explain the concept of keyframe animation. In your answer, address the following questions: What are keyframes, who specifies them, and what is the task of the computer? 23

e) Briefly explain how to magnify or minify an image (with the final size being a non-integer multiple of the original) using proper reconstruction filters. f) [Extra Credit] Give the final convolution formula used in (e), and discuss the types of filters one may use. 24

Work sheet 25

Work sheet 26