1/160
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai |
|---|
No analytics yet
Send a link to your students to track their progress
quaternions
who introduced them to graphics?
what are its components? how many dimensions?
why are they not susceptible to gimbal lock?
ken shoemake introduced to graphics, but they were discovered by william hamilton (important)
4d entities, a single real value and 3 imaginary axes
they represent a single, direct rotation in 3d space, not 3 independent axes in a sequence
where is rotation controlled?
it is passed as a uniform into the vertex shader
e.g. uniform mat4 modelview contains all the rotation data
wwhy larry roberts famous
' the interpretation of a matrix as a geometrical operator is the foundation of mathematical transformatiosn in computer graphcis"
what is a primitive? what is a vertex?
a triangle or quadilateral
a 2d or 3d location and any associated attributes (position attribute mandatory)
vector dot product info (5)
dot product code
if a and b are unit length, a dot b = cos theta. if not, cos theta = a dot b / magnitude of a * magnitude of b
a dot b = 0 if they are perpendicular
for unit vectors, a dot b = 1 if same vector and -1 if opposite direction
float cosTheta = dot(a,b) / length(a) * length(b)
left handed system vs right handed system
in left handed system, positive z goes away from you, in RHS it goes towards you
alternatively, for flat xy plane. z goes down for LHS, up for RHS
in math its usually RHS
vector cross product
cross product code
vec3 N = normalize(cross(p2-p1, p3-p2))
where the 3 poitns of the triangle are p1, p2, p3
gemoetric transformations and their operations (4)
euclidean (rigid body): rotation, translation
linear: rotation, uniform/differential scale
affine: rotation, translation, uniform/differential scale
projective: rotation, translation, scale, perspective
what kind of system do the rotation as complex multiplication equations form? why is this relevant?
a linear system, which means they can be represented by a matrix
what does the 2d scale matrix look like
can a 2x2 matrix represent an affine transformation? (translation)
what matrix can?
no, because a 2x2 matrix can only do multiplication/scale, cannot do addition to input (affine, not linear, transformation)
a 2x3 matrix, with an additional homogeneous coordinate on the input
why are square matrices preferred?
what does this do to the transformation matrices?
what will the transformation matrix now yield?
they are invertible and any vector times a square matrix yields a vector of the same size
since an extra column was added to support translation, an extra row is also added to make it a square matrix
the result will be the same x' and y' plus an additional homogenous coordinate
what do the 2d transformation matrices look like? what by what size?
if you multiply a 3x3 matrix by a 3x1 input matrix, how many dot products is it equivalent to?
3 dot products, one for each row
what do the 3d geometric transformation matrixes look like? what by what size?
4x4 matrices, 3 rotation matrices, one for each axis
multiple rotations are order dependent
how do you do multiple transformations at once? what is this called?
concatenation
yields a single matrix that is a continuous, linear transformation with a geometric interpolation
e.g. mat4 m = Rotate(xAng, yAng, zAng) * Scale(sx, sy, sz) * Translate(dx, dy, dz);
process of rotating a point/object about a fixed center
code example
move c to origin, rotate, then move back
vec4 pTransform = Translate(c)RotateZ(θ)Translate(-c)*vec4(p, 1);
what is the general order for matrices? (e.g. row major or column-major)
row major for most, but open gl uses column major
also random fact most graphics and opengl use right handed coord system but pixar uses left
what is graphical projection
creates a 2d image from a 3d object.
if the image is flat (e.g. your computer screen vs imax curved screen), the projection is planar and straight lines remain straight
perspective projection vs parallel projection
how are points in scene translated to the image plane to achieve perspective?
what is the key axis here?
what is the division by pz known as and how can it be implemented?
in computer graphics, how are ordinary 3d points represented?
as 4d homogeneous points
how do you convert an ordinary point into a 4d homogeneous one
how to convert 4d homogeneous point to an ordinary 3d one? why is this significant?
shows that homogeneous points inherently represent division
what is a homogeneous vector? how does it differ from homogeneous point?
(x,y,z,0), a point at infinity
w is 0 isntead of 1
does a transformed homogeneous point/vector remain a homogeneous point/vector?
yes
what is the modelview matrix?
it is combination of model transformation (moves object from object space into world space) and view transformation (shifts the world so that camera is at 0,0)
basically takes points from object into eye/camera space, where lighting is calculated
it is for affine transformations, basically combines rotation, scale, and translation into one matrix
what is the view frustum
the volume of 3d space that represents everything be camera can see, sandwiched between the near plane and the far plane and bounded by the top left bottom right planes