1 / 14

Three-Dimensional Viewing Clipping

Three-Dimensional Viewing Clipping. Computer Graphics C Version (456p - 462p). Objectives of this Chapter. General Ideas How clipping could be performed using the view volume Normalized view volume Homogeneous coordinates . General Ideas for 3D Clipping. A Point of Similarity

lam
Download Presentation

Three-Dimensional Viewing Clipping

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. Three-Dimensional ViewingClipping Computer Graphics C Version (456p - 462p)

  2. Objectives of this Chapter • General Ideas • How clipping could be performed using the view volume • Normalized view volume • Homogeneous coordinates

  3. General Ideas for 3D Clipping • A Point of Similarity • Accomplished with extensions of 2D clipping method • A Point of Difference • Clipping against boundary planes of view volume instead of boundary edge

  4. Line Clipping - 1 • View volume’s boundary plane Eq • Ax + By + Cz + d = 0 • If point is (x, y, z) • Inside boundary: Ax + By + Cz + d < 0 • Outside boundary: Ax + By + Cz + d > 0

  5. Line Clipping - 2 • Cases of 2 end points’ position • All inside • Saved • All outside • Discard • Leaving intersection • One inside, one outside • Leaving intersection • Intersection coordinate (xi, yi, zi) Axi + Byi + Czi + d = 0

  6. Viewing Transformation - 1 • Expanded PHIGS transformation pipeline

  7. Viewing Transformation - 1 • View Volume Clipping • Rectangular parallelepiped view volume Clipping • Unit cube clipping

  8. Viewing Transformation - 1

  9. Viewing Transformation - 2 • View Volume Clipping • Needs to obtain all 6 planes equations • Rectangular parallelepiped view volume Clipping • Each surface is perpendicular to one coordinate axes • Converting to Rect parallelepiped view volume Orthographic view volume Oblique view volume Perspective view volume

  10. Viewing Transformation - 3 • Unit cube clipping • Providing standard shape for representing any sized view volume • Providing simplified clipping procedure • Providing simplified depth cueing and visible-surface determination ->Normalized view volume

  11. Normalized View Volume • Dimensions of the view volume and 3D viewport

  12. Normalized View Volume Dx= Dz= Dy= Kx= Ky= Kz=

  13. Viewport Clipping • Cohen Sutherland (6 Bit code) • Bit 1 =1 x<XVmin (left) • Bit 2 =1 x<XVmax (right) • Bit 3 =1 y<YVmin (below) • Bit 4 =1 y>YVmin (above) • Bit 5 =1 z<ZVmin (front) • Bit 6 =1 z>ZVmax (back) • Cyrus-Beck or Liang-Barsky • X = X1 + (X2 - X1)u • Y = Y2 + (Y2 - Y1)u • Z = Z3 + (Z2 – Z1)u

  14. Clipping in Homogeneous Coordinates • Conversion • (x, y, z) -> (x, y, z, 1) X’= Y’= Z’= =

More Related