1 / 20

CSL 859: Advanced Computer Graphics

CSL 859: Advanced Computer Graphics. Dept of Computer Sc. & Engg. IIT Delhi. User Interfaces. Keyboard Mouse Widgets or Menus? Gesture based Optical/Magnetic tracking Visual language?. Virtual Trackball. Map mouse motion to rotation of a volume Imagine mouse dragged on ground plane

gyda
Download Presentation

CSL 859: Advanced Computer Graphics

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. CSL 859: Advanced Computer Graphics Dept of Computer Sc. & Engg. IIT Delhi

  2. User Interfaces • Keyboard • Mouse • Widgets or Menus? • Gesture based • Optical/Magnetic tracking • Visual language?

  3. Virtual Trackball • Map mouse motion to rotation of a volume • Imagine mouse dragged on ground plane • from (x1, z1) to (x2, z2) • Imagine the points raised onto unit hemisphere • from (x1, y1, z1) to (x2, y2, z2)

  4. Trackball • p1: x12+y12+z12 = 1 • p2: x22+y22+z22 = 1 • Ball rotates about the axis formed by p1 and p2 • p1 X p2 • Rotation angle proportional to the distance p1p2 • Or simply ||p1 X p2|| • What happens if the object is not at the origin?

  5. Graphics Pipeline • Transform vertices • Light vertices • Clip to Window extremes • Setup edges • Rasterize • Fill and interpolate colors, depth • Test against Z-buffer • One entry per pixel: closest so far • Update Color and Z buffers

  6. Why Transformation? • Modeling? • Projection? • Viewport?

  7. Transform Vertices? T(p) = aT(p1) + bT(p2) + cT(p3)) p0 p = a p0 + b p1 + cp2 p1 p2

  8. Matrix Transformations • Composition • (A (B (C x))) = (A B C) x • Fixed frame of reference • Rotation • Scaling • Translation • Shear • Projection

  9. Composition: Fixed frame • T(1,0) • R(90) • R T p

  10. Composition: Local frame • T(1,0) • R(90) • R T p

  11. cos θ -sin θ sin θ cos θ Rotation r r θ r cos β r cos α

  12. Rotation

  13. Translation

  14. 1 0 0 tx 0 1 0 ty 0 0 1 tz 0 0 0 1 x y z w Translation

  15. Scale

  16. 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0 x y z 1 Perspective Transformation x,y,z,w x,y,z,z 1

  17. Transform = Change Basis • New Axis: x’, y’, z’ • New Origin: o • +Scale xT 0 yT 0 zT 0 13T 0 T-o

  18. Linear and Affine transform • Linear: x’ = Ax • Scale, Rotation • T(ax + by) = aT(x) + bT(y) • Affine: Translate • x’ = Ax + b • Transforms a line to a line • Respects parallelism • Does not respect angles and lengths

  19. Projective Transformation • n-dimensional projective space is an n+1-dimensional vector space • 0,0,0,… is not a part of this space • x = kx • xn+1 == 0 => Point at infinity {= Direction} • Actually any coordinate may be chosen • Affine space is a projection of Projective space • Typically on the plane xn+1 = 1 • Projective transformation • xj = ∑aixi • Ax, A is a 4x4 matrix (15 DOF!)

  20. Normal Transformation n.p = 0 nTp = 0 => n’T Mp must be 0 => (M’n)T Mp = 0 => nTM’T Mp = 0 => M’T M = kI => M’T = M-1 (k = 1) => M’ = k(M-1)T

More Related