DOC PREVIEW
UVA CS 445 - Clipping

This preview shows page 1-2-3 out of 10 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 10 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 10 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 10 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 10 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

1Greg HumphreysCS445: Intro GraphicsUniversity of Virginia, Fall 2004Clipping3D Rendering Pipeline (for direct illumination)3D PrimitivesModelingTransformationProjectionTransformationClippingLightingImageViewportTransformationScanConversion2D Image Coordinates3D Modeling Coordinates3D World Coordinates3D Camera Coordinates2D Screen Coordinates2D Screen CoordinatesViewingTransformation3D World Coordinates2D Image Coordinates3D Rendering Pipeline (for direct illumination)3D PrimitivesModelingTransformationProjectionTransformationClippingLightingImageViewportTransformationScanConversion2D Image Coordinates3D Modeling Coordinates3D World Coordinates3D Camera Coordinates2D Screen Coordinates2D Screen CoordinatesViewingTransformation3D World Coordinates2D Image Coordinates2D Rendering PipelineViewportTransformationScanConversionClipping2D PrimitivesImageClip portions of geometric primitivesresiding outside the window Fill pixels representing primitives in screen coordinatesTransform the clipped primitivesfrom screen to image coordinates 3D Primitives2D Rendering PipelineViewportTransformationScanConversionClipping2D PrimitivesImageClip portions of geometric primitivesresiding outside the window Fill pixels representing primitives in screen coordinatesTransform the clipped primitivesfrom screen to image coordinates 3D PrimitivesClipping• Avoid drawing parts of primitives outside window Window defines part of scene being viewed Must draw geometric primitives only inside windowScreen CoordinatesWindow2Clipping• Avoid drawing parts of primitives outside window Window defines part of scene being viewed Must draw geometric primitives only inside windowViewingWindowClipping• Avoid drawing parts of primitives outside window Points Lines Polygons Circles etc.ViewingWindowPoint ClippingWindowwx1 wx2wy2wy1(x,y)• Is point (x,y) inside the clip window?inside = (x >= wx1) && (x <= wx2) && (y >= wy1) && (y <= wy2);Line Clipping• Find the part of a line inside the clip windowP1P10P9P8P7P4P3P6P5P2Before ClippingP’8P’7P4P3P6P’5After ClippingLine Clipping• Find the part of a line inside the clip windowCohen Sutherland Line Clipping• Use simple tests to classify easy cases firstP1P10P9P8P7P4P3P6P5P23Cohen Sutherland Line Clipping• Classify some lines quickly by AND of bit codesrepresenting regions of two endpoints (must be 0)Bit 1 Bit 2Bit 3Bit 40000 010010000001 010110010010 01101010P1P10P9P8P7P4P3P6P5P2Cohen Sutherland Line Clipping• Classify some lines quickly by AND of bit codesrepresenting regions of two endpoints (must be 0)Bit 1 Bit 2Bit 3Bit 40000 010010000001 010110010010 01101010P1P10P9P8P7P4P3P6P5P2Cohen Sutherland Line Clipping• Classify some lines quickly by AND of bit codesrepresenting regions of two endpoints (must be 0)Bit 1 Bit 2Bit 3Bit 40000 010010000001 010110010010 01101010P10P9P8P7P4P3P6P5Cohen Sutherland Line Clipping• Classify some lines quickly by AND of bit codesrepresenting regions of two endpoints (must be 0)Bit 1 Bit 2Bit 3Bit 40000 010010000001 010110010010 01101010P10P9P8P7P4P3P6P5Cohen-Sutherland Line Clipping• Compute intersections with window boundary forlines that can’t be classified quicklyBit 1 Bit 2Bit 3Bit 40000 010010000001 010110010010 01101010P10P9P8P7P4P3P6P5Cohen-Sutherland Line Clipping• Compute intersections with window boundary forlines that can’t be classified quicklyBit 1 Bit 2Bit 3Bit 40000 010010000001 010110010010 01101010P10P9P8P7P4P3P6P54Cohen-Sutherland Line Clipping• Compute intersections with window boundary forlines that can’t be classified quicklyBit 1 Bit 2Bit 3Bit 40000 010010000001 010110010010 01101010P10P9P8P7P4P3P6P’5Cohen-Sutherland Line Clipping• Compute intersections with window boundary forlines that can’t be classified quicklyBit 1 Bit 2Bit 3Bit 40000 010010000001 010110010010 01101010P10P9P8P7P4P3P6P’5Cohen-Sutherland Line Clipping• Compute intersections with window boundary forlines that can’t be classified quicklyBit 1 Bit 2Bit 3Bit 40000 010010000001 010110010010 01101010P10P9P8P7P4P3P6P’5Cohen-Sutherland Line Clipping• Compute intersections with window boundary forlines that can’t be classified quicklyBit 1 Bit 2Bit 3Bit 40000 010010000001 010110010010 01101010P10P9P8P7P4P3P6P’5Cohen-Sutherland Line Clipping• Compute intersections with window boundary forlines that can’t be classified quicklyBit 1 Bit 2Bit 3Bit 40000 010010000001 010110010010 01101010P10P9P8P’7P4P3P6P’5Cohen-Sutherland Line Clipping• Compute intersections with window boundary forlines that can’t be classified quicklyBit 1 Bit 2Bit 3Bit 40000 010010000001 010110010010 01101010P10P9P8P’7P4P3P6P’55Cohen-Sutherland Line Clipping• Compute intersections with window boundary forlines that can’t be classified quicklyBit 1 Bit 2Bit 3Bit 40000 010010000001 010110010010 01101010P10P9P’8P’7P4P3P6P’5Cohen-Sutherland Line Clipping• Compute intersections with window boundary forlines that can’t be classified quicklyBit 1 Bit 2Bit 3Bit 40000 010010000001 010110010010 01101010P10P9P’8P’7P4P3P6P’5Cohen-Sutherland Line Clipping• Compute intersections with window boundary forlines that can’t be classified quicklyBit 1 Bit 2Bit 3Bit 40000 010010000001 010110010010 01101010P10P9P’8P’7P4P3P6P’5Cohen-Sutherland Line Clipping• Compute intersections with window boundary forlines that can’t be classified quicklyBit 1 Bit 2Bit 3Bit 40000 010010000001 010110010010 01101010P10P9P’8P’7P4P3P6P’5Cohen-Sutherland Line Clipping• Compute intersections with window boundary forlines that can’t be classified quicklyBit 1 Bit 2Bit 3Bit 40000 010010000001 010110010010 01101010P10P9P’8P’7P4P3P6P’5Cohen-Sutherland Line Clipping• Compute intersections with window boundary forlines that can’t be classified quicklyBit 1 Bit 2Bit 3Bit 40000 010010000001 010110010010 01101010P10P9P’8P’7P4P3P6P’56Cohen-Sutherland Line Clipping• Compute intersections with window boundary forlines that can’t be classified quicklyBit 1 Bit 2Bit 3Bit 40000 010010000001 010110010010 01101010P’8P’7P4P3P6P’5Clipping• Avoid drawing parts of primitives outside window Points Lines Polygons Circles etc.2D Screen CoordinatesWindowPolygon Clipping• Find the part of a polygon inside the clip window?Before ClippingPolygon Clipping• Find the part of a polygon inside the clip window?After ClippingSutherland Hodgeman Clipping• Clip to each


View Full Document

UVA CS 445 - Clipping

Documents in this Course
Lighting

Lighting

49 pages

Color

Color

20 pages

Shadows

Shadows

95 pages

Color

Color

37 pages

Radiosity

Radiosity

49 pages

Clipping

Clipping

59 pages

Assign 3

Assign 3

28 pages

Splines

Splines

17 pages

Color

Color

17 pages

Load more
Download Clipping
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Clipping and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Clipping 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?