Comp Graphics - Geometry

  1. A square matrix is invertible if and only if ...
    It's determinant is non-zero
  2. A vector has both ...
    Magnitude and direction
  3. A camera is an example of a ...
    Viewer
  4. Types of line equation
    • Implicit
    • Parametric
  5. Implicit line equation
    ax + by + c = 0
  6. Parametric line equation
    ( x, y ) = t ( x0, y0 )  + t ( dx, dy )
  7. Alternate parametric line equation
    ( x, y ) = ( x0, y0 ) + ( 1 - t ) ( x1, y1 )
  8. Number of points needed to define a line
    2
  9. What is a ray
    • A half infinite line
    • I.e the line goes from t = 0 to infinity
  10. What does the implicit equation in 3D yield?
    A plane (not a line)
  11. Number of points needed to define a plane
    3
  12. How to obtain normal vector from a plane
    • For points p1, p2, p3
    • Normal vector = ( p2 - p1 ) x (p3 - p1)
  13. How is a triangle defined
    Three non-colinear points
  14. Barycentric coordinate equation
    p = λ1p1 + λ2p2 + λ3p3
  15. When are barycentric coordinates used
    To plot coordinates inside of triangles
  16. Geometric transformations are used for
    converting from one coordinate system to another
  17. 3D Homogeneous coordinates
    • Four elements (x, y, z, w)
    • Allow all transformations to be performed by matrix multiplication
  18. Homogeneous coordinates: w value for a point
    w = 1
  19. Homogeneous coordinates: w value for a vector
    w = 0
  20. Coordinate system (3D)
    • Three linearly independent vectors
    • Usually orthogonal
  21. Coordinate frame
    A coordinate system with a point representing the origin
  22. Model-view-projection steps
    • 1. Model transformation
    • 2. View transformation
    • 3. Projection transformation
    • 4. Perspective division (where needed)
    • 5. Window coordinates are computed
  23. Model transformation
    Placing the object into the world
  24. View transformation
    The world is transformed into eye/camera coordinates
  25. Projection transformation
    The coordinates are transformed into clip-coordinates
  26. Purpose of perspective division in MVP
    Obtaining normalized device coordinates
  27. MVP frames that the programmer works with
    • Model frame
    • Object frame
    • Eye frame
  28. Affine transformation
    A transformation that preserves lines
  29. Most efficient way to apply multiple transformations to many points
    • 1. Since each transformation is a matrix, multiply the matrices
    • 2. Pass the matrix product to the GPU/shader
    • 3. Multiply each point with the matrix product
    • Matrix-matrix multiplication is slow and shouldn't be repeated if no necessary
  30. Requirements for a rotation tranformation
    • An axis (x, y, z) that is unchanged by the rotation
    • A rotation angle
  31. How to rotate around some point (other than the origin)
    • Translate everything, so that P is at the origin T(P)
    • Perform the rotation
    • Translate everything back so that P is where it was before T(-P)
  32. How to perform arbitrary rotations about the origin
    • A combination of x, y and z rotations
    • Finding the angle of each rotation is usually difficult
  33. How to rotate by some angle, θ, about an arbitrary axis (given by a vector, u)
    • 1. Normalize u to get v
    • 2. Rotate such that v is along the pos-z axis (use xy rotations)
    • 3. Perform z-rotation by θ
    • 4. Rotate so that v is back to where it started (inverse of step 2)
  34. Instance transformation
    A transformation on a given instance of an object
  35. Typical order of transformations
    • 1. Scale
    • 2. Rotate
    • 3. Translate
    • M= TRS · v
  36. Order of transformation matrices when constructing an MVP matrix
    • 1. Initialize to or multiply by translation matrix first
    • 2. Multiply result by rotation matrix
    • 3. Multiply result by scale matrix
    • This will produce a matrix product of the form TRS
  37. Where should the transformation matrix be computed?
    • In the application (on the CPU)
    • Calculate only once
  38. Where should the transformation matrix be applied?
    • On the GPU (shader program)
    • Pass the prepared matrix and the vertices to transform to the shader
Author
Ant
ID
357675
Card Set
Comp Graphics - Geometry
Description
Updated