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

Similar documents
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.

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

CS 130 Final. Fall 2015

CS4202: Test. 1. Write the letter corresponding to the library name next to the statement or statements that describe library.

CS 130 Exam I. Fall 2015

Exercise Max. Points Total 90

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

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

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

A simple OpenGL animation Due: Wednesday, January 27 at 4pm

Illumination and Shading

CS 130 Exam I. Fall 2015

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

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

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

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

Lecture 17: Shading in OpenGL. CITS3003 Graphics & Animation

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

CS 4620 Midterm, March 21, 2017

Comp 410/510 Computer Graphics. Spring Shading

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

ECS 175 COMPUTER GRAPHICS. Ken Joy.! Winter 2014

CPSC GLOBAL ILLUMINATION

Topics and things to know about them:

Objectives Shading in OpenGL. Front and Back Faces. OpenGL shading. Introduce the OpenGL shading methods. Discuss polygonal shading

Interpolation using scanline algorithm

Computer Graphics I Lecture 11

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

Exercise Max. Points Total 80

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

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

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

3D Graphics Pipeline II Clipping. Instructor Stephen J. Guy

CS559 Computer Graphics Fall 2015

CS559 Computer Graphics Fall 2015

Computer Graphics. Illumination and Shading

Geometric Queries for Ray Tracing

CS 464 Review. Review of Computer Graphics for Final Exam

- Rasterization. Geometry. Scan Conversion. Rasterization

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

Problem Max. Points Total 80

Institutionen för systemteknik

Illumination and Shading

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

The University of Calgary

Total 80

U.C. Berkeley, EECS, Computer Science TAKE HOME EXAM. Your Class Computer Account: DO NOT OPEN THIS INSIDE SODA HALL -- WAIT UNTIL YOU ARE ALONE!

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

Shading I Computer Graphics I, Fall 2008

Objectives. Introduce the OpenGL shading Methods 1) Light and material functions on MV.js 2) per vertex vs per fragment shading 3) Where to carry out

Name: [20 points] Consider the following OpenGL commands:

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

Illumination Models & Shading

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

CS Surface Rendering

CSE 690: GPGPU. Lecture 2: Understanding the Fabric - Intro to Graphics. Klaus Mueller Stony Brook University Computer Science Department

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

CS452/552; EE465/505. Intro to Lighting

Homework #2 and #3 Due Friday, October 12 th and Friday, October 19 th

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

CSE 167: Introduction to Computer Graphics Lecture #11: Visibility Culling

Lecture 15: Shading-I. CITS3003 Graphics & Animation

Computer Graphics: Programming, Problem Solving, and Visual Communication

Chapter 7 - Light, Materials, Appearance

Introduction to Computer Graphics 7. Shading

Pipeline Operations. CS 4620 Lecture 14

Reflection and Shading

CS559 Computer Graphics Fall 2015

Lecture 8 Ray tracing Part 1: Basic concept Yong-Jin Liu.

CSE528 Computer Graphics: Theory, Algorithms, and Applications

Shadow Algorithms. CSE 781 Winter Han-Wei Shen

Topic 9: Lighting & Reflection models 9/10/2016. Spot the differences. Terminology. Two Components of Illumination. Ambient Light Source

Illumination and Shading

OpenGL Transformations

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

Computer Graphics Lighting

Computer Graphics Lighting. Why Do We Care About Lighting?

Questions??? Announcements Assignment 3 due today

Topic 9: Lighting & Reflection models. Lighting & reflection The Phong reflection model diffuse component ambient component specular component

Chapter 2 A top-down approach - How to make shaded images?

Lighting and Shading Computer Graphics I Lecture 7. Light Sources Phong Illumination Model Normal Vectors [Angel, Ch

Computer Graphics Coursework 1

CSE 167: Introduction to Computer Graphics Lecture #10: View Frustum Culling

3D Programming. 3D Programming Concepts. Outline. 3D Concepts. 3D Concepts -- Coordinate Systems. 3D Concepts Displaying 3D Models

Rendering Pipeline and Coordinates Transforms

Shading. Introduction to Computer Graphics Torsten Möller. Machiraju/Zhang/Möller/Fuhrmann

Lighting. Figure 10.1

TSBK 07! Computer Graphics! Ingemar Ragnemalm, ISY

CS Illumination and Shading. Slide 1

Computer Science 426 Midterm 3/11/04, 1:30PM-2:50PM

Surface Graphics. 200 polys 1,000 polys 15,000 polys. an empty foot. - a mesh of spline patches:

Shading. Brian Curless CSE 457 Spring 2017

Deferred Rendering Due: Wednesday November 15 at 10pm

Graphics Hardware and Display Devices

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

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

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

Advanced Lighting Techniques Due: Monday November 2 at 10pm

8.1 Geometric Queries for Ray Tracing

9. Illumination and Shading

Transcription:

CSE 167 - Intro to Computer Graphics ANSWER KEY: Midterm Examination November 18, 2003 Instructor: Sam Buss, UC San Diego Write your name or initials on every page before beginning the exam. You have 75 minutes. There are eight problems. You may not use cheat sheets, calculators, notes, textbooks, or other materials during this exam. You must show your work in order to get credit. Good luck! 1 2 3 Name: Student ID: 4 5 6 7 8 Total

Name: 2 1. An affine transformation A(x) :R 2 R 2 maps the F -shape on the left to the F on the right. 0, 1 y 1, 1 1, 1 y 0,1 0, 0 1, 0 x = 2, 0 1, 0 0,0 x 0, 1 a. Give a 3 3 matrix that represents A over homogeneous coordinates. ANSWER: A = 1 1 1 1 0 0 0 0 1. b. Give a 3 3 matrix that represents A 1 over homogeneous coordinates. ANSWER: A 1 = 0 1 0 1 1 1 0 0 1. 2. Consider the following sequence of OpenGL commands: glmatrixmode(gl MODELVIEW); glloadidentity(); glrotatef( 90.0, 0, 1, 0 ); glrotatef( 90.0, 0, 0, 1 ); glrotatef( -90.0, 0, 1, 0 ); // Watch out: negative sign! gltranslatef( 3, 4, 5 ); Show explicitly the contents of the 4 4 ModelView matrix after these commands have been executed. ANSWER: 1 0 0 3 0 0 1 5 0 1 0 4 0 0 0 1 You must be careful here to note. that the gltranslatef comes after the glrotatef s.

Name: 3 3. An ellipsoid has 2 radii equal to 1 and one radius equal to 2. It can be viewed as a unit sphere which has been stretched to twice its usual width and streches from 0 = 0, 0, 0 to 4, 0, 0. The ellipsoid has circular crosssections when intersected with planes parallel to the yz-plane. The GLUT command glutsolidsphere(r, 10, 10); can used to generate a sphere of radius r. Using this command, plus other OpenGL commands, such as glmatrixmode, glloadidentity, glrotatef, glscalef, gltranslatef, write a code fragment that will generate the ellipsoid. ANSWER: glmatrixmode(gl MODELVIEW); glloadidentity(); gltranslatef( 2.0, 0.0, 0.0 ); glscalef(2.0, 1.0, 1.0); glutsolidsphere( 1.0, 10, 10 ); 4. What are the different kinds of light from point light sources in the Phong lighting model? Give a short descrition of each one (one sentence, and possibly a simple picture). ANSWER: Specular light Light that reflects primarily in the direction of perfect reflection (see figure III.3, on page 69.). Diffuse light Light that reflects with equal brightness in all directions (see figure III.2, on page 69). Ambient light This is not really from a point light source, but no points were taken off if it was mentioned, since the OpenGL implementation of Phong lighting does include ambient light from point light sources.

Name: 4 5. The hyperboloid H is the set of points defined by H = { x, y, z : x 2 y 2 z 2 =1,x>0}. Suppose p = p 0,p 1,p 2 is a point on H. normal to the surface H at the point p. Give a formula for a unit vector ANSWER: Let f(x, y, z) =x 2 y 2 z 2. Then f = 2x, 2y, 2z. A unit vector normal to the surface p = p 0,p 1,p 2 is given by f(p) f(p) = p 0, p 1, p 2 p 2 0 + p 2 1 +. p2 2 6. Describe the difference between Gouraud shading and Phong shading. Which one is commonly used by OpenGL? What are the relative advantages of Gouraud shading over Phong shading? What are the relative advantages of Phong shading over Gouraud shading? ANSWER: Gouraud shading computes the colors at each vertex of a triangle (or quad or polygon) with the Phong lighting model and interpolates their colors into the interior of the shape. Phong shading interpolates normal vectors from the vertices into the interior of the shape, and recomputes illumination levels (i.e., color values) of each pixel with the Phong lighting model. Gouraud shading is commonly used by OpenGL. Advantages of Gouraud shading are speed, simplicity and ease of implementation. Advantages of the Phong shading: Much better at catching specular highlights and spotlights. Better results with rendering with large polygons and when animating a scene. The disadvantage of Phong lighting is that infomation about the lights, and the material propertes, etc., must be remembered until late in the graphics rendering pipeline.

Name: 5 7. Let x = 2, 2 and y = 1, 1. (a) What is the point u 1 = Lerp(x, y, 1)? ANSWER: 1, 1. (b) What is the point u 2 = Lerp(x, y, 1 2 )? ANSWER: 1 2, 1 2. (c) What is the point u 3 = Lerp(x, y, 2)? ANSWER: 8, 8. (d) Let u 4 = 1, 1. Find the value of α such that Lerp(x, y,α)=u 4. ANSWER: α = 1 3. 8. Let x = 1, 0, 5 and y = 0, 5, 1 and z = 4, 1, 2 be the vertices of triangle. Consider barycentric coordinates relative to this triangle. (a) What point v 1 has barycentric coordinates 1 3, 1 3, 1 3? ANSWER: 1, 2, 2 3. (b) What point v 2 has barycentric coordinates 1, 0, 0? ANSWER: 1, 0, 5. (c) What point v 3 has barycentric coordinates 1 4, 1 4, 1 2? ANSWER: 7 4, 3 2, 0. (d) What point v 4 has barycentric coordinates 1 3, 2 3, 0? ANSWER: 1 3, 10 3, 1. (e) What are the barycentric coordinates of the point y? ANSWER: 0, 1, 0.