Presentation is loading. Please wait.

Presentation is loading. Please wait.

Three-Dimensional Viewing Clipping Computer Graphics C Version (456p - 462p)

Similar presentations


Presentation on theme: "Three-Dimensional Viewing Clipping Computer Graphics C Version (456p - 462p)"— Presentation transcript:

1 Three-Dimensional Viewing Clipping 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 Kx= Ky= Kz= Dx= Dy= Dz=

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’=


Download ppt "Three-Dimensional Viewing Clipping Computer Graphics C Version (456p - 462p)"

Similar presentations


Ads by Google