CSCE 441 Lecture 20

From Notes
Jump to navigation Jump to search

« previous | Friday, February 28, 2014 | next »

End Exam 1 content


Exam Review

6 questions, some with multiple parts (max sub-parts = 18)

  • Explanations, short-answer
  • Computation
  • No programming

50 minutes to complete


Know Algorithms

  • Scan conversion
  • Clipping


Clipping

Cohen-Sutherland

Region Codes where 1 bit means "outside the window"

  • If bitwise AND between region codes of endpoints is non-zero, then trivially reject
  • If bitwise OR is identical to zero, then trivially accept
  • Otherwise, have to split line into two segments via intersection


Liang-Barsky
  1. Set up parametric equation of line for t∈[0,1]
  2. Find intersection parameter with boundary.
  3. Reject if xmin>xmax

Transformations

Taking vector equations and turning them into matrix Form


Cross Product Matrix

(v×◻)=[0−vzvyvz0−vx−vyvx0]


Non-Uniform Scaling

p^=p→+(α−1)(v→⋅(p→−o→))v→

What's multiplied?

  • I
  • (α−1)v→v→T

What's added?

  • (1−α)v→(v→⋅o→)


[p^1]=[I+(α−1)v→v→T(1−α)v→(v→⋅o→)01][p→1]

3D Rotations

p^=o→+(1−cos⁡θ)(v→⋅q→)v→+(v→×q→)sin⁡θ+q→cos⁡θ

q^=(1−cos⁡θ)(v→⋅q→)+(v→×q→)sin⁡θ+q→cos⁡θ


What is multiplied by q→?

  • cos⁡θ, but it's not a scalar, so we need an identity factor: cos⁡θI
  • sin⁡θ(v→×◻)
  • (1−cos⁡θ)v→v→T

We add all of these things together (esentially factoring out q→) and fill in the upper-left block of our matrix

[cos⁡θI+sin⁡θ(v→×◻)+(1−cos⁡θ)v→v→T001]

Color

  • Half-toning
  • Dithering
  • Error diffusion
  • models of color
  • Equations (total of 3; one per color)
  • Properties of light

Lighting

(last topic covered chronologically)

Know definitions and ways to compute

  • Ambient
  • Diffuse
  • Specular