CS代考 COSC422 Advanced Computer Graphics

13 Summary
R. Mukundan Department of Computer Science and Software Engineering University of Canterbury, .

Final Exam

Copyright By PowCoder代写 加微信 powcoder

 Online exam via Learn.
 15th June 2022, Duration: 2 Hours (2:30pm – 4:30pm)
 Number of questions: 8, : 50
 Uses randomized questions
 Each question drawn from a set of 4 similar questions.
 Answers manually graded
 Once you start the exam, you must complete it within the
allotted time.
 A calculator will be required.
 Preparation: Past year exams
R. Mukundan, CSSE, University of Canterbury

Final Exam
 Format: Learn Quiz with essay type questions  You will not be required to write any equations
R. Mukundan, CSSE, University of Canterbury

Equations Provided in Exam
 The following formulae will be provided if required for answering any of the questions:
 Vector cross product
 Rotation matrices
 Equation for t at the point of intersection between  a ray and a plane
 a ray and a sphere
R. Mukundan, CSSE, University of Canterbury

Equations NOT Provided in Exam
 A vector from one point to another
 Vector dot product, computation of angle
 Magnitude of a vector, normalization of a vector.
 Linear interpolation equation
 Homogeneous to Cartesian coordinate conversion
 Translation, scale transformation matrices
 Ambient, diffuse and specular reflections from a polygonal vertex
 Half-way vector used in computing specular reflections
 Equation of a ray
R. Mukundan, CSSE, University of Canterbury

Topics NOT Covered in Exam
 Platonic Solids, Object formats ([1]: 8-10, 21-22) OpenGLeventhandlingmethods ([1]:42-59)
 Transformation of light sources ([2]: 23)
 Auto texturing, sky boxes, billboarding ([4]: 25, 33-36)  Particle systems ([5]: 27-34)
 Virtual trackball, planar shadows ([6]: 27-28, 30-32)
 First-person views ([7]: 21-25)
 Refractions, anti-aliasing, cylinder, cone ([8]:21-23, 36-47) WebGL ([12])
R. Mukundan, CSSE, University of Canterbury

1 OpenGL Basics
You may be asked to write small OpenGL code segments (see past year exams) containing some basic functions. You must be able to use any of the following functions with relevant parameters in the code:
glBegin(), glEnd() glVertex3f(), glVertex4f()
glTexCoord2f() glNormal3f()
glPushMatrix(), glPopMatrix()
glTranslatef(), glRotatef(), glScalef()
Model definitions
R. Mukundan, CSSE, University of Canterbury
Transformations

1 OpenGL Basics
You must be familiar with the following OpenGL functions, and be able to explain their applications. You must be able to use any of the following functions with relevant parameters in a small code segment:
gluLookAt()
glFrustum() gluPerspective()
glLightfv() glMaterialfv() glTexParameteri()
View, Projection
R. Mukundan, CSSE, University of Canterbury

1 OpenGL Basics
 Representation of R, G, B, C, M, Y, W, K colours using normalized floating point values.
 Right-handed reference frame for Cartesian coordinates.  Camera fixed coordinate frame and view frustum
R. Mukundan, CSSE, University of Canterbury

2 Transformations
 Sequence of transformations
 Order in which OpenGL transformation functions are called.  Order in which transformation matrices are multiplied.
 Rotations about pivot points  OpenGL transformation stack
Specifyingtransformationsinside nested glPushMatrix() – glPopMatrix() blocks.
 Structure of fundamental transformation matrices:  Identifying simple transformations (scale, translation,
rotation) from a given matrix
R. Mukundan, CSSE, University of Canterbury

Transformations: OpenGL Functions
 Exam 2021
R. Mukundan, CSSE, University of Canterbury

Transformations: Matrix Representations
 Exam 2019
90 deg rotation about the x-axis Scale transformation using scale factors 4,3,2
Translation by vector (1, 2, 1)
• A rotation about the y-axis by −45 degrees followed by
• A translation by vector (4, 3, 2)
R. Mukundan, CSSE, University of Canterbury

Transformations: Pivot point rotations
R. Mukundan, CSSE, University of Canterbury
glTranslatef(5, 8, 3); glRotatef(30, 0, 0, 1); glTranslatef(-5, -8, -3); drawObject();

3 OpenGL Illumination Model
 OpenGL illumination model
 Light-material interaction
 Ambient, diffuse, specular reflections and their properties  Half-way vector h = l + v
 Spotlights
VC = La*Ma + Ld*Md max(l•n , 0) + Ls*Ms{max(r•v , 0)}f
VC = La*Ma + Ld*Md max(l•n , 0) + Ls*Ms{max(h•n , 0)}f
VC = La*Ma + Ld*Md max(l•n , 0) + Ls*Ms{max(h•n , 0)}f + Me
R. Mukundan, CSSE, University of Canterbury

 Exam 2021
Illumination Model: Important Vectors
R. Mukundan, CSSE, University of Canterbury
• Angle between n and h = 10 degs, • Angle between r and v = 20 degs

Illumination Model: Lighting Equation
Light’s properties: Ambient: (0.2, 0.2, 0.2) Diffuse: White Specular: White
Material’s properties: Ambient: Cyan Diffuse: Cyan Specular: White
 : Angle between light source vector and normal vector = 45 degs  : Angle between reflection vector and view vector = 30 degs
f : Phong’s exponent = 10.
VC = La*Ma + Ld*Md max(l•n , 0) + Ls*Ms{max(r•v , 0)}f
= (0.2, 0.2, 0.2)(0, 1, 1) + (1,1,1)(0, 1, 1) cos45 + (1,1,1) (cos 30)10
= (0, 0.2, 0.2) + (0, 0.707, 0.707) + (0.237, 0.237, 0.237) = (0.237, 1, 1)
R. Mukundan, CSSE, University of Canterbury

Illumination Model: Spotlights
Light’s properties: Ambient La: (0.2, 0.2, 0.2) Diffuse Ld: White Specular Ls: White
Cutoff angle: 
Direction: d
Exponent: 
Ld =Ld cos()
Ls = Ls cos()
La remains unchanged in both cases
R. Mukundan, CSSE, University of Canterbury
If  > : Ld =0 Ls = 0

4 Texture Mapping
 Assigning texture coordinates to vertices Texturewrapmodes(GL_REPEAT, GL_CLAMP)
 Minification and magnification filtering (concepts only) Mipmaps (generalconcepts)
R. Mukundan, CSSE, University of Canterbury

 Exam 2021
Texture Mapping
R. Mukundan, CSSE, University of Canterbury

Object Modelling
 Extruded surfaces
 The process of constructing a surface from a base polygon
 Triangle strips and quad strips
 Surfaces of revolution
 The process of constructing a surface from a base curve
 You will not be asked to write any OpenGL code for constructing sweep surfaces using rotational transforms.
R. Mukundan, CSSE, University of Canterbury

6 Mathematical Aspects
 Homogeneous coordinates  Vector operations
 Dot products, Orthogonality of vectors, Angle between vectors
 Cross products, Surface normal computation
 Linear interpolation
 You will not be required to perform any vector-matrix or matrix-matrix multiplications.
R. Mukundan, CSSE, University of Canterbury

7 Mathematics of Lighting and Viewing
 The lighting equation
 Vectors used in the lighting equation  Ambient, diffuse and specular terms  Half-way vector
 spotlight
R. Mukundan, CSSE, University of Canterbury

7 Mathematics of Lighting and Viewing
 Specifying camera position and orientation in 3D space. gluLookAt()
 The eye coordinate frame
 The view transformation matrix and the projection matrices
will not be required for answering any questions.
 View volumes
 glFrustum(L, R, B, T, N, F)
 gluPerspective(aspect, fov, N, F)
 Conversions between parameters of the above two frustum definitions
 Eye coordinates and clip coordinates
R. Mukundan, CSSE, University of Canterbury

 Global illumination models
 Ray definition (parametric equation)
 Equations for computing reflected rays, ray-plane intersections and ray-sphere intersections will be given.
 You must be able to compute the points of intersection on a plane or a sphere using the equations.
R. Mukundan, CSSE, University of Canterbury

 Exam 2018
t = ( A − p0 )  n dn
(a) p0 = (4,2,0), d = (3, 0, 4), d (normalized) = (0.6, 0, 0.8) (b) (A-p0) = (3, 3, 12), n = (0, 0.8, -0.6), d.n = -0.48, t = 10 (c) Point of intersection Q = (4, 2, 0) + 10 (0.6, 0, 0.8) = (10, 2, 8)
R. Mukundan, CSSE, University of Canterbury

 Exam 2019
t=−(s•d) (s•d)2 −(s•s)+r2
s=P-C P = (2, 1, 2), C = (10, 7, 2), d = (0.8, 0.6, 0), r = 4
s = (-8, -6, 0). s.d = -6.4 -3.6+0 = -10, (s.d)2 = 100. s.s = 100 t = 10 +/- 4 = 6, 14
Closest point of intersection Q = (2,1,2) + 6. (0.8, 0.6, 0) = (6.8, 4.6, 2)
R. Mukundan, CSSE, University of Canterbury

9 OpenGL-4
 Vertex and Fragment shaders (General concepts, structure, applications)
Vertexbufferobjects (Generalconcepts)
 You are not required to remember any OpenGL-4, GLM
functions.
 Mechanisms for passing values between application and shaders, and between shaders.
 Typical outputs of a vector and a fragment shader
 You may be given a shader code and asked to describe parts
of the implemented method.
R. Mukundan, CSSE, University of Canterbury

Parametric Domains, Bezier Surfaces
 Quad and triangle domains
 Barycentric coordinates
 You will not be required to construct equations using Bernstein polynomials.
 Quadratic and cubic Bezier curves and surfaces (concepts and properties)
R. Mukundan, CSSE, University of Canterbury

Tessellation Shader
GL_PATCHES (generalproperties)
 Tessellation Coordinates
 Tessellation levels
 Tessellation control shader and evaluation shader  Usefulness and main applications
 Built-in variable gl_in
 You will not be asked to write any shader code
 You may be given a shader code and asked to describe the
implemented method.
R. Mukundan, CSSE, University of Canterbury

12 Geometry Shader
 General concepts – inputs, capabilities
 Usefulness of a geometry shader (sample applications)
 GL_TRIANGLES_ADJACENCY primitive
 You will not be asked to write any shader code.
 You may be given a shader code and asked to describe the
implemented method.
R. Mukundan, CSSE, University of Canterbury

 Exam 2019
Shader Code
R. Mukundan, CSSE, University of Canterbury

Tessellation Levels
 Exam 2019 1 Exam 2021 2
All outer tessellation levels will have the same value.
Outer tessellation levels = (4, 4, 4, 4), Inner tessellation levels = (3, 3) A = (0, 1), B = (0.33, 0.66), C = (0.5, 0), D = (1, 0.75)
Outer tessellation levels = 2,2,2,2 Inner tessellation levels = 3, 3 C = (0, 1), D = (0.66, 0.33), E = (1, 0.5)
R. Mukundan, CSSE, University of Canterbury

Tessellation Levels
 Exam 2018
All outer tessellation levels will have the same value.
The points whose barycentric coordinates are required to be calculated will be located either at the centre or along the edges of the triangle.
Outer tessellation levels = 2,2,2,0 Inner tessellation levels = 4, 0 C = (0, 0, 1), D = (0, 0.5, 0.5), E = (0.33, 0.33, 0.33)
R. Mukundan, CSSE, University of Canterbury

R. Mukundan, CSSE, University of Canterbury
Where to next?

COSC422 Advanced Computer Graphics
COSC422 covers a range of topics that find applications in real- time rendering and animation.
 Applications of shader stages: Non-photorealistic rendering, Particle systems, Point sprites, Transformation feedback.
 Image Based Rendering (IBR): Framebuffer Objects, Imposter rendering, Projective texturing, Shadow mapping
 Hierarchical transformations: Scene graphs
 Motion Data and Skeletal Animation
 3D Character animation
 Quaternions and Inverse Kinematics
 Advanced modelling: Mesh processing algorithms
R. Mukundan, CSSE, University of Canterbury

2022 2022 2022 2022
2021 2021 2021 2021
The present state of CG
R. Mukundan, CSSE, University of Canterbury

R. Mukundan, CSSE, University of Canterbury
Good Luck!

程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com