SlideShare a Scribd company logo
1 of 23
Clipping Any Procedure that identifies those portions of a picture that are either inside or outside of a specified region of a space is referred to as a  Clipping algorithm  or simply  Clipping . The region against which an object is to clipped is called a  Clip Window.
  Clipping   * Clipping algorithms are 2D-3D. * Clipping algorithm can be implemented in hardware or  software. * When implemented in software, clipping algorithms are  slower than required for real time applications. * For this reason both 2D & 3D clipping algorithm have been implemented in hardware or firmware. * The purpose of a clipping algorithm is to determine which points, lines or portions of lines lie with in the clipping window. * These points, lines or portions of lines are relative for display. * All other are discarded.
* Application of clipping include extracting part of a defined scene for viewing. * Identifying visible surface in 3D views. * Antiliasing line segment or object boundaries. * Creating objects using solid-modeling procedures. * Displaying a multi window environment. * Drawing & painting operation that allow part of a picture to be selected for clipping, moving, erasing or duplicating.
[object Object]
Types of Clipping ,[object Object],[object Object],[object Object],[object Object],[object Object]
Point Clipping ,[object Object],[object Object],[object Object],[object Object]
Line Clipping ,[object Object],[object Object],[object Object]
  Line Clipping * Lines are interior to the clipping window &  hence visible if both end points are interior to  the window. * Points are interior to the clipping window provided  that XL <= X <= XR YB <= Y <= YT
I J G H E F A B C D K L Right Bottom Top Left Line Clipping
Line Clipping   * However, if both endpoints of a line are exterior to the window, the line is not necessarily completely exterior to the window. * If both end points of a lines are:- ,[object Object],[object Object]
Cohen & Sutherland Algorithm ,[object Object],[object Object]
Cohen & Sutherland Algorithm The rightmost bit is the first bit. The bits are set to 1 based on the following scheme. 1) First bit Set- If the end point is to the left of the window.   2) Second bit Set- If the end point is to the right of the window.   3) Third bit Set- If the end point is to the below the window.   4) Fourth bit Set- If the end point is to the above  the window.  Otherwise the bit is set to Zero. It is obvious that, if both end point codes are zero, then both ends of the line lie inside the window & the line is visible.
Cohen & Sutherland Algorithm ,[object Object],[object Object],[object Object],[object Object],B L R T XL XR YT YB Window 0101 0100 0110 0001 0000 0010 1001 1000 1010
Cohen & Sutherland Algorithm ,[object Object],[object Object],[object Object],[object Object]
Cohen & Sutherland Algorithm ,[object Object],[object Object],[object Object]
Cohen & Sutherland Algorithm ,[object Object],[object Object]
Cohen & Sutherland Algorithm ,[object Object],[object Object],[object Object],[object Object],[object Object],P4 P4’ P3’ P3 P1 P1’ P2” P2” P2
Cohen & Sutherland Algorithm ,[object Object],[object Object],[object Object],[object Object],[object Object]
Cohen & Sutherland Algorithm ,[object Object],[object Object],[object Object]
Mid Point Subdivision Algorithm ,[object Object],[object Object],[object Object]
Mid Point Subdivision Algorithm ,[object Object],[object Object],[object Object]
Mid Point Subdivision Algorithm ,[object Object],[object Object],[object Object],[object Object]
Mid Point Subdivision Algorithm P1 P2 Pm1 Pm2 Pm2 P1 P2 Pm1 Pm2

More Related Content

What's hot

Window to viewport transformation
Window to viewport transformationWindow to viewport transformation
Window to viewport transformation
Ankit Garg
 
The sutherland hodgeman polygon clipping algorithm
The sutherland hodgeman polygon clipping algorithmThe sutherland hodgeman polygon clipping algorithm
The sutherland hodgeman polygon clipping algorithm
Mani Kanth
 
Hidden surface removal
Hidden surface removalHidden surface removal
Hidden surface removal
Ankit Garg
 
Polygon Fill
Polygon FillPolygon Fill
Polygon Fill
wahab13
 

What's hot (20)

Clipping
ClippingClipping
Clipping
 
3 d display methods
3 d display methods3 d display methods
3 d display methods
 
Polygon filling algorithm
Polygon filling algorithmPolygon filling algorithm
Polygon filling algorithm
 
Clipping in Computer Graphics
Clipping in Computer GraphicsClipping in Computer Graphics
Clipping in Computer Graphics
 
Raster scan system & random scan system
Raster scan system & random scan systemRaster scan system & random scan system
Raster scan system & random scan system
 
Clipping
ClippingClipping
Clipping
 
Weiler atherton
Weiler athertonWeiler atherton
Weiler atherton
 
Bresenham's line drawing algorithm
Bresenham's line drawing algorithmBresenham's line drawing algorithm
Bresenham's line drawing algorithm
 
Frame buffer
Frame bufferFrame buffer
Frame buffer
 
Anti aliasing Computer Graphics
Anti aliasing Computer GraphicsAnti aliasing Computer Graphics
Anti aliasing Computer Graphics
 
Anti- aliasing computer graphics
Anti- aliasing computer graphicsAnti- aliasing computer graphics
Anti- aliasing computer graphics
 
3d transformation computer graphics
3d transformation computer graphics 3d transformation computer graphics
3d transformation computer graphics
 
Clipping ( Cohen-Sutherland Algorithm )
Clipping ( Cohen-Sutherland Algorithm )Clipping ( Cohen-Sutherland Algorithm )
Clipping ( Cohen-Sutherland Algorithm )
 
COMPUTER GRAPHICS-"Projection"
COMPUTER GRAPHICS-"Projection"COMPUTER GRAPHICS-"Projection"
COMPUTER GRAPHICS-"Projection"
 
Window to viewport transformation
Window to viewport transformationWindow to viewport transformation
Window to viewport transformation
 
The sutherland hodgeman polygon clipping algorithm
The sutherland hodgeman polygon clipping algorithmThe sutherland hodgeman polygon clipping algorithm
The sutherland hodgeman polygon clipping algorithm
 
Computer Graphics - Hidden Line Removal Algorithm
Computer Graphics - Hidden Line Removal AlgorithmComputer Graphics - Hidden Line Removal Algorithm
Computer Graphics - Hidden Line Removal Algorithm
 
Hidden surface removal
Hidden surface removalHidden surface removal
Hidden surface removal
 
2 d viewing computer graphics
2 d viewing computer graphics2 d viewing computer graphics
2 d viewing computer graphics
 
Polygon Fill
Polygon FillPolygon Fill
Polygon Fill
 

Similar to Clipping

Lecture 2d point,curve,text,line clipping
Lecture   2d point,curve,text,line clippingLecture   2d point,curve,text,line clipping
Lecture 2d point,curve,text,line clipping
avelraj
 

Similar to Clipping (20)

kgv.pptx
kgv.pptxkgv.pptx
kgv.pptx
 
Lecture 2d point,curve,text,line clipping
Lecture   2d point,curve,text,line clippingLecture   2d point,curve,text,line clipping
Lecture 2d point,curve,text,line clipping
 
Clipping
ClippingClipping
Clipping
 
ibuib.pptx
ibuib.pptxibuib.pptx
ibuib.pptx
 
99995327.ppt
99995327.ppt99995327.ppt
99995327.ppt
 
line clipping
line clipping line clipping
line clipping
 
ohu.pptx
ohu.pptxohu.pptx
ohu.pptx
 
Clipping
ClippingClipping
Clipping
 
Clipping
ClippingClipping
Clipping
 
Unit 4 notes
Unit 4 notesUnit 4 notes
Unit 4 notes
 
Clipping
ClippingClipping
Clipping
 
Windowing clipping
Windowing   clippingWindowing   clipping
Windowing clipping
 
Clipping computer graphics
Clipping  computer graphicsClipping  computer graphics
Clipping computer graphics
 
Unit2- line clipping.pptx
Unit2- line clipping.pptxUnit2- line clipping.pptx
Unit2- line clipping.pptx
 
Liang- Barsky Algorithm, Polygon clipping & pipeline clipping of polygons
Liang- Barsky Algorithm, Polygon clipping & pipeline clipping of polygonsLiang- Barsky Algorithm, Polygon clipping & pipeline clipping of polygons
Liang- Barsky Algorithm, Polygon clipping & pipeline clipping of polygons
 
Clipping
ClippingClipping
Clipping
 
Comparison of Various Line Clipping Algorithm for Improvement
Comparison of Various Line Clipping Algorithm for ImprovementComparison of Various Line Clipping Algorithm for Improvement
Comparison of Various Line Clipping Algorithm for Improvement
 
Lect 5 2d clipping
Lect 5 2d clippingLect 5 2d clipping
Lect 5 2d clipping
 
lecture8 clipping
lecture8 clippinglecture8 clipping
lecture8 clipping
 
Clipping 22
Clipping 22Clipping 22
Clipping 22
 

Recently uploaded

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 

Recently uploaded (20)

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 

Clipping

  • 1. Clipping Any Procedure that identifies those portions of a picture that are either inside or outside of a specified region of a space is referred to as a Clipping algorithm or simply Clipping . The region against which an object is to clipped is called a Clip Window.
  • 2. Clipping * Clipping algorithms are 2D-3D. * Clipping algorithm can be implemented in hardware or software. * When implemented in software, clipping algorithms are slower than required for real time applications. * For this reason both 2D & 3D clipping algorithm have been implemented in hardware or firmware. * The purpose of a clipping algorithm is to determine which points, lines or portions of lines lie with in the clipping window. * These points, lines or portions of lines are relative for display. * All other are discarded.
  • 3. * Application of clipping include extracting part of a defined scene for viewing. * Identifying visible surface in 3D views. * Antiliasing line segment or object boundaries. * Creating objects using solid-modeling procedures. * Displaying a multi window environment. * Drawing & painting operation that allow part of a picture to be selected for clipping, moving, erasing or duplicating.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8. Line Clipping * Lines are interior to the clipping window & hence visible if both end points are interior to the window. * Points are interior to the clipping window provided that XL <= X <= XR YB <= Y <= YT
  • 9. I J G H E F A B C D K L Right Bottom Top Left Line Clipping
  • 10.
  • 11.
  • 12. Cohen & Sutherland Algorithm The rightmost bit is the first bit. The bits are set to 1 based on the following scheme. 1) First bit Set- If the end point is to the left of the window. 2) Second bit Set- If the end point is to the right of the window. 3) Third bit Set- If the end point is to the below the window. 4) Fourth bit Set- If the end point is to the above the window. Otherwise the bit is set to Zero. It is obvious that, if both end point codes are zero, then both ends of the line lie inside the window & the line is visible.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.
  • 20.
  • 21.
  • 22.
  • 23. Mid Point Subdivision Algorithm P1 P2 Pm1 Pm2 Pm2 P1 P2 Pm1 Pm2