DOC PREVIEW
UVA CS 445 - Clipping and Scan Conversion

This preview shows page 1-2-3-4-5-6-44-45-46-47-48-49-50-89-90-91-92-93-94 out of 94 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 94 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 94 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 94 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 94 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 94 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 94 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 94 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 94 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 94 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 94 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 94 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 94 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 94 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 94 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 94 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 94 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 94 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 94 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 94 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 94 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Clipping and Scan ConversionJason LawrenceCS 445: GraphicsAcknowledgment: slides by Misha Kazhdan, Allison Klein, Tom Funkhouser,Adam Finkelstein and David DobkinLightingCameraTransformation3D Rendering Pipeline (for direct illumination)3D PrimitivesModelingTransformationProjectionTransformationClippingImageViewportTransformationScanConversion2D Image Coordinates3D Modeling Coordinates3D World Coordinates3D Camera Coordinates2D Screen Coordinates2D Screen Coordinates3D Camera Coordinates2D Image Coordinates3D Model2D ImageTransformationsModelingTransformationCameraTransformation2D Image CoordinatesProjectionTransformationWindow-to-ViewportTransformation3D Object Coordinates3D World Coordinates3D Camera Coordinates2D Screen Coordinatesp(x,y,z)p’(x’,y’)3D WorldCoordinates3D ObjectCoordinatesTransformationsModelingTransformationCameraTransformation2D Image CoordinatesProjectionTransformationWindow-to-ViewportTransformation3D Object Coordinates3D World Coordinates3D Camera Coordinates2D Screen Coordinatesp(x,y,z)p’(x’,y’)3D WorldCoordinatesTransform=MM := local to world transformTransformationsModelingTransformationCameraTransformation2D Image CoordinatesProjectionTransformationWindow-to-ViewportTransformation3D Object Coordinates3D World Coordinates3D Camera Coordinates2D Screen Coordinatesp(x,y,z)p’(x’,y’)3D WorldCoordinates3D CameraCoordinatesTransform=MM := local to world transformTransformationsModelingTransformationCameraTransformation2D Image CoordinatesProjectionTransformationWindow-to-ViewportTransformation3D Object Coordinates3D World Coordinates3D Camera Coordinates2D Screen Coordinatesp(x,y,z)p’(x’,y’)Camera RightCamera UpxyzCamera BackTransform=C-1MC := camera transformTransformationsModelingTransformationCameraTransformation2D Image CoordinatesProjectionTransformationWindow-to-ViewportTransformation3D Object Coordinates3D World Coordinates3D Camera Coordinates2D Screen Coordinatesp(x,y,z)p’(x’,y’)Transform=PC-1MP := projection transformTransformationsModelingTransformationCameraTransformation2D Image CoordinatesProjectionTransformationWindow-to-ViewportTransformation3D Object Coordinates3D World Coordinates3D Camera Coordinates2D Screen Coordinatesp(x,y,z)p’(x’,y’)Transform=VPC-1MV := viewport transformImageNormalized CoordsViewportWindowTransformationsModelingTransformationCameraTransformation2D Image CoordinatesProjectionTransformationWindow-to-ViewportTransformation3D Object Coordinates3D World Coordinates3D Camera Coordinates2D Screen Coordinatesp(x,y,z)p’(x’,y’)vx1vx2vy1vy2wx1wx2wy1wy2Window ViewportScreen CoordinatesImage Coordinates(wx,wy) (vx,vy)Transform=VPC-1MV := viewport transform3D Rendering Pipeline (for direct illumination)3D Model2D Viewport2D ScreenModelingTransformationCameraTransformation2D Image CoordinatesProjectionTransformationWindow-to-ViewportTransformation3D Object Coordinates3D World Coordinates3D Camera Coordinates2D Screen Coordinatesp(x,y,z)p’(x’,y’)LightingCameraTransformation3D Rendering Pipeline (for direct illumination)3D PrimitivesModelingTransformationProjectionTransformationClippingImageViewportTransformationScanConversion2D Image Coordinates3D Modeling Coordinates3D World Coordinates3D Camera Coordinates2D Screen Coordinates2D Screen Coordinates3D Camera Coordinates2D Image CoordinatesClipping• Avoid drawing parts of primitives outside windowoWindow defines part of scene being viewed oMust draw geometric primitives only inside windowScreen CoordinatesWindowClipping• Avoid drawing parts of primitives outside windowoPoints oLine SegmentsoPolygonsScreen CoordinatesWindowPoint ClippingWindowwx1 wx2wy2wy1(x,y)• Is point (x,y) inside the clip window?Point ClippingWindowwx1 wx2wy2wy1(x,y)• Is point (x,y) inside the clip window?inside = (x >= wx1) && (x <= wx2) && (y >= wy1) && (y <= wy2);Clipping• Avoid drawing parts of primitives outside windowoPointsoLine SegmentsoPolygonsScreen CoordinatesWindowLine Segment Clipping• Find the part of a line inside the clip windowP1P10P9P8P7P4P3P6P5P2Before ClippingP’8P’7P4P3P6P’5After ClippingLine Segment Clipping• Find the part of a line inside the clip window"Cohen-Sutherland Line Clipping• Use simple tests to classify easy cases firstP1P10P9P8P7P4P3P6P5P2Cohen-Sutherland Line Clipping• If both outcodes are 0, line segment is inside• If AND of outcodes not 0, line segment is outside• Otherwise clip and testBit 1 Bit 2Bit 3Bit 40000 010010000001 010110010010 01101010P1P10P9P8P7P4P3P6P5P2Cohen-Sutherland Line Clipping• If both outcodes are 0, line segment is inside• If AND of outcodes not 0, line segment is outside• Otherwise clip and testBit 1 Bit 2Bit 3Bit 40000 010010000001 010110010010 01101010P10P9P8P7P4P3P6P5P1P2Cohen-Sutherland Line Clipping• If both outcodes are 0, line segment is inside• If AND of outcodes not 0, line segment is outside• Otherwise clip and testBit 1 Bit 2Bit 3Bit 40000 010010000001 010110010010 01101010P1P10P9P8P7P6P5P2P4P3Cohen-Sutherland Line Clipping• If both outcodes are 0, line segment is inside• If AND of outcodes not 0, line segment is outside• Otherwise clip and testBit 1 Bit 2Bit 3Bit 40000 010010000001 010110010010 01101010P10P9P8P7P6P5P4P3Cohen-Sutherland Line Clipping• If both outcodes are 0, line segment is inside• If AND of outcodes not 0, line segment is outside• Otherwise clip and testBit 1 Bit 2Bit 3Bit 40000 010010000001 010110010010 01101010P10P9P8P7P4P3P6P5Cohen-Sutherland Line Clipping• If both outcodes are 0, line segment is inside• If AND of outcodes not 0, line segment is outside• Otherwise clip and testBit 1 Bit 2Bit 3Bit 40000 010010000001 010110010010 01101010P10P9P8P7P4P3P6P5Cohen-Sutherland Line Clipping• If both outcodes are 0, line segment is inside• If AND of outcodes not 0, line segment is outside• Otherwise clip and testBit 1 Bit 2Bit 3Bit 40000 010010000001 010110010010 01101010P10P9P8P7P4P3P6P’50000 010010000001 010110010010 01101010Cohen-Sutherland Line Clipping• If both outcodes are 0, line segment is inside• If AND of outcodes not 0, line segment is outside• Otherwise clip and testBit 1 Bit 2Bit 3Bit 4P10P9P8P7P4P3P6P’50000 010010000001 010110010010 01101010Cohen-Sutherland Line Clipping• If both outcodes are 0, line segment is inside• If AND of outcodes not 0, line segment is outside• Otherwise clip and testBit 1 Bit 2Bit 3Bit 4P10P9P8P7P4P3P6P’50000 010010000001 010110010010 01101010Cohen-Sutherland


View Full Document

UVA CS 445 - Clipping and Scan Conversion

Documents in this Course
Lighting

Lighting

49 pages

Color

Color

20 pages

Clipping

Clipping

10 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 and Scan Conversion
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 Scan Conversion 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 and Scan Conversion 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?