1 / 35

CS148: Introduction to Computer Graphics and Imaging Midterm Review Session

This outline provides information about the midterm, review topics, drawing in OpenGL, geometry, transforms and coordinate systems, fonts/typography, splines, input devices and interaction, color, and cameras and perspective.

celestej
Download Presentation

CS148: Introduction to Computer Graphics and Imaging Midterm Review Session

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CS148: Introduction to Computer Graphics and Imaging Midterm Review Session

  2. Outline • Midterm info • Review of topics • Drawing in OpenGL • Geometry: points, lines, vectors • Transforms and coordinate systems • Fonts/typography • Splines • Input devices and interaction • Color • Cameras and perspective

  3. Midterm info • Time: Tue, Feb 13th at 7pm • Location: Building 260, Rm 113 • Duration: 2 hours • Closed book • Consists of a few (4 or 5) multi-part questions • All material through last lecture (cameras) • Strongly emphasized: material on assignments • Focus on: material from lectures • Also covered: material from readings

  4. Drawing in OpenGL • OpenGL primitives • glBegin/glEnd • Double buffering • GLUT events • display • reshape • keyboard

  5. Geometry • Dot product • Cross product • What are orthonormal vectors? • Can you add two points? • What do you get when you add a vector to a point?

  6. Geometry • Line defined by (x1, y1) and (x2, y2) • What is parametric form? • What is implicit form? • Which side of the line is point P on?

  7. Transforms • Think about them in two ways • Applying to object • Applying to coordinate axes • Order matters

  8. Transforms Translate(1,1) Rotate(45O)

  9. Transforms – Apply to object Translate(1,1) Rotate(45O)

  10. Transforms – Apply to object Translate(1,1) Rotate(45O)

  11. Transforms – Apply to coordinate system Translate(1,1) Rotate(45O)

  12. Transforms – Apply to coordinate system Translate(1,1) Rotate(45O)

  13. Transforms – Apply to coordinate system Translate(1,1) Rotate(45O)

  14. Transforms – order matters Translate(1,0) Rotate(45O) Rotate(45O) Translate(1,0)

  15. Transforms – order matters Scale(2,2) Translate(0,1) Translate(0,1) Scale(2,2)

  16. Transforms • Homogeneous coordinates • Transforms as matrices

  17. Transforms • Homogeneous coordinates • Transforms as matrices glScalef(2.0, 3.0) No change glTranslatef(1.0, 1.0) glRotatef(60.0, 0.0, 0.0, 1.0) gluOrtho (0, 200, 0, 200,-1.0, 1.0)

  18. Transforms • Some volume of coordinate space is viewable on screen. • Orthographic projection • glOrtho/gluOrtho2D • Perspective projection • gluPerspective • glFrustum

  19. Transforms • Transforms implemented as matrix vector multiplications (to window coordinates) glViewport Projection transform (camera space to clip space) gluPerspective glRotate Viewing transform (world space to camera space) Vertex position in window= (vx,vy) glTranslate … = M3 M1 M2 M4 M5 M6 M9 glScale glRotate Modeling transform (object space to world space) glTranslate glRotate glScale [vertex V] Ex: (1,0) in object space

  20. Typography • Font units • Terminology • Character map • Glyphs + glyph metrics • Kerning • Leading

  21. Interpolation • Have discrete set of points • Want continuous function going through points

  22. Interpolation • Bilinear interpolation • Barycentric interpolation V3 V = 1V1 + 2V2 + 3V3 1 + 2 + 3 = 1 2 1 V 3 V2 V1

  23. Interpolation • Want curve p(t) to go through all control points Ci

  24. Cubic splines • Basis functions (Bi’s) are cubic polynomials • Different basis functions yield splines with different properties • Hermite Splines • Catmull-Rom Splines • Bezier Splines

  25. Input devices • The user presses a key. What happens?

  26. Input devices • The user presses a key. What happens? Scan code (make and break codes) Virtual key code Glyph index Glyph

  27. Input devices • How does a mouse work? • What is quadrature encoding? • Joystick input • Axes/buttons/D-pads

  28. Interaction • Polling vs. events • Events • Event loop • Event queues • Callbacks (event handlers) • Associating events with objects • Propagating events • Model-view-controller pattern

  29. Physics of light • Energy from source distributed across many wavelengths: S() • Units: Watts

  30. Physics of light • Adding light • L() = E1() + E2() • Filtering light • L() = T()E() • Sensor Response

  31. Color perception • What color do we perceive from E()? • Explain statement: humans have trichromatic color vision • Rods and Cones

  32. Color perception • What is the CIEXYZ color space? • Why is the region within the spectral locus the span of all observable colors? • Luminance • Think: Response of rods to E() • Units = lumens • Lightness = Luminance1/3

  33. Cameras and Lenses • Pinhole camera (x,z) f Field of view film x’ pinhole

  34. Cameras and Lenses • Pinhole camera (x,z) f Field of view film x’ pinhole

  35. Cameras and Lenses • Focal length How does is correspond to zoom? • Depth of field Can a pinhole camera produce depth of field effects? • Bayer mosaic

More Related