CS 112: Introduction to Computer Graphics (Winter 2016)
Written Assignment 2 (Total Points = 84)
Due: Monday, Feb 1 - 1:30pm PST
1. Consider a 2D square on the XY plane with side 2 units, the center at the origin
and four sides parallel or perpendicular t
1 Transforming a parallelepiped (10pt)
There are 3 sets of parallel edges. Angles and distances are preserved in a rigid
body transformation.
So we can transform one point A and its 3 neighbors
B, C and D (see gure). That takes 4*16 multiplications and 4*
CS 112
The Rendering Pipeline
Aditi Majumder, CS 112
Slide 1
Rendering Pipeline
Input 3D Object/Scene Representation
Output An image of the input object/scene
Stages (for POLYGON pipeline)
Model view Transformation
Projection Transformation
Clipping and V
CS 112 - Object Representation
Aditi Majumder, CS 112
Slide 1
What is Graphics?
Modeling
Analysis
Computer representation of the 3D world
For efficient rendering
For catering the model to different
applications.
Rendering
Generating 2D images of the 3D wo
CS 112 Transformations I
Aditi Majumder, CS 112
Slide 1
Geometric Entities
Points P = (x,y,z)
Vectors
Two points : v = P-Q
v
Magnitude - | v |
(xP-xQ, yP-yQ,zP-zQ) = (vx, vy, vz)
P
Sqrt(xP-xQ)2 + (yP-yQ) 2+ (zP-zQ)2)
Direction
v
Q
v=|v|v
v - Unit Vector
A
View-Perspective Projection
Aditi Majumder, CS 112
Slide 1
Default OpenGL View
Eye at Origin
Image plane perpendicular to negative Z
View Up Vector coincident with Y
Y (View Up Vector)
Eye
Z (Normal to Image plane)
X
Aditi Majumder, CS 112
Slide 2
1
View
CS 112 Transformations II
Aditi Majumder, CS 112
Slide 1
Composition of Transformations
Example: A point P is first translated and then
rotated. Translation matrix T, Rotation Matrix R.
Example: A point is first rotated and then
translated.
After Translat
DDDH
6 To nd me scaling matrix, ve 4x4 matrices must be multiplied togeiher.
a.
b.
C.
d.
e.
Translate [-2, -3, 4] so that the rooted point acts as me origin
Rotate such that the vector u = [2, 1, 2] is aligned with an axis [e.g. the Laxis]
Scale about the
Kanan Sasaki
38399655
CS 112
8 November 2016
Written Assignment #3
1. B. (B A) x (C A)
2. A. Between the model-view and the projection transformations
3. For orthographic projection we can use a dot product with the faces normal (ie. N.V >
0). For perspec
Kanan Sasaki
38399655
Professor Meenakshisundaram
13 October 2016
Written Assignment #1
1. Graphics Rendering Pipeline
a. Input 3D objects
b. Model View Transformation
c. Projection Transformation
d. Clipping and Vertex Interpolation
e. Window Coordinate
Kanan Sasaki
38399655
CS 112
5 December 2016
Written Assignment #4
1. Artifacts:
a. We can remove the artifacts using Mipmapping
b. It works using sampling theory because the distant end of the floor is small and
we dont have enough pixels to sample an ad
Kanan Sasaki
38399655
CS 112
24 October 2016
Written Assignment #2
1.
a. You could accomplish the same effect with just glRotate(90, 0, 0, 1);
2.
If you do
glTranslate(0,0,1) and glScale(0,0,1) then you will get the same answer regardless of the
order you
CS 111: Digital Image Processing (Fall 2015)
Written Assignment 3
Total Points: 60
Due: Wednesday, Dec 2, 2:00pm
1) To find transformations between quadrilateral images (specifying four corresponding or tie points) you
use a bilinear function of the form
Fall 2016, CS 112
Programming Assignment 2
Due: Octorber 24, 2016 11:59pm
PROJECT GOAL: Write a restricted OpenGL library.
The goal of the project is to compute all the transformation matrices with your library
instead of using OpenGL library. Since you a
Programming Assignment 4
Texture Mapping in OpenGL
ICS 112, Fall 2016
Due: 11:55PM, Nov 30, 2016
In this assignment, we are going to apply texture mapping in OpenGL.
For theoretical explanation of texture mapping, please refer to our lecture slides, or
ht
PopQuiz(Week8)[20mins]20pts
Name:_StudentID:_
Pleaseshowyourworkforpartialcredits.
1) [13=1+3+2+2+3+2]ConsiderthetriangleABCbeingclippedatEandF.
A(150,200)
F
E
B(100,100)
C(300,100)
a) IfEisthemiddlepointofBC,whatisthexmaxofthewindow?
b) Usingthecomputedx
Pop Quiz (Week 2) Solution
1) A)
e=VE+F=58+5=2
B)
e = 2 2g => g = 0
C)
Same
2) A)
Vertices: A, B, C, D, E, F
Edges: AB, AC, AD, DC, ED, EC, CF, EF
B) Topology
C) Manifold With Boundaries
Pop Quiz (Week 4) Solution
1) 4 by 4
2) Fundamental rigid body transformations are translation and rotation. Translation has 3
degree of freedom which are the amount of translation in x, y and z direction.
Rotation around an arbitrary vector has 7 degree
PopQuiz(Week6)[10mins]10pts
Name:_StudentID:_
Pleaseshowyourworkforpartialcredits.
1) [1]TheefficiencyofSutherlandHodgemanpolygonclippingmethodstemsfrom
a) Pipelining
b) Integercomputations
c) Logiccomputations
2) [1]TheefficiencyofLiangBarskylineclipping
1.
2.
3.
This will be done by using w=0 in the homogeneous coordinate. This represents only a direction
which is equivalent to point at infinity.
4.
5.
6.
7.
1) Input 3D object goes through the following transformations.
a. ModelView Transformation
b. Projection Transformation
c. Window Coordinate Transformation
d. Clipping and Vertex Interpolation
e. Rasterization and Pixel Interpolation.
This creates t
Pop Quiz Answers
1) Consider a surface point P with normal (0,1,0). Let the light direction be (1,1,1) and the
view direction be (0,0,1). Let the coefficient of diffused and specular reflection be 0.2 and 0.3
respectively. Let the intensity of point light
Fall 2016, CS 112
Programming Assignment 3
Submission Due: Nov 19, 2016, 11:55 PM PST
PROJECT GOAL: Implement your own lighting and compare it with OpenGL
lighting.
Pair programming is optional for this assignment, you can either work with a
partner or al
Fall 2016, CS 112
Programming Assignment 1 (100 points)
Submission Due: 3rd October, Monday
1 Assignment Policies
Before introducing this assignment, let us review the policies which we will be enforcing for all
assignments this quarter.
About software an
Pop Quiz (Week 2) [10 mins] 10 pts
Name:_Student ID:
_
Mark all the correct answers.
1) [2+2+2=6] Consider the following 3D shape.
a) Its Euler characteristics is
e = V-E+F = 2, choose ii)
i) 1
ii) 2
iii) 3
iv) 4
b) Its genus will be
number of handles, 0
1(BA)(CA)
2Betweenthemodelviewandtheprojectiontransformation
3Inorthographicprojection,theviewdirectionVisalwaysthesame.Therefore,adotproductwiththe
face's normal would be enough to cull the face when N V > 0. For perspective projection, different
pixelsi