SlideShare a Scribd company logo
CLIPPING IN 2D


    BY.. ASHIV KHAN
       JOHNSON
          ASTIN
       DEVAHARI
2D CLIPPING
 Any procedure which identifies that portion of a
  picture which is either inside or outside a region
  is referred to as a clipping algorithm or
  clipping.
 The region against which an object is to be
  clipped is called clipping window.
2D Clipping
 Point clipping easy: Just check the inequalities
   xmin < x < xmax
   ymin < y < ymax
 Line clipping more tricky
Cohen Sutherland clipping Algorithm
 The Cohen–Sutherland algorithm is a computer
 graphics algorithm used for line clipping
Cohen Sutherland clipping Algorithm
 Every line endpoint is assigned a 4 bit Region code. The
  appropriate bit is set depending on the location of the endpoint
  with respect to that window component as shown below:


 Endpoint Left of window then set bit 1
 Endpoint Right of window then set bit 2
 Endpoint Below window then set bit 3
 Endpoint Above window then set bit 4
Cohen-Sutherland Line Clipping
 To clip a line, find out which regions its two endpoints lie in.
 If they are both in region 0000, then it’s completely in.
 If the two region numbers both have a 1 in the same bit
  position, the line is completely out.
 Otherwise, we have to do some more calculations.
Cohen-Sutherland clipping algorithm
 To clip a line, find out which regions its two endpoints lie in.
 If they are both in region 0000, then it’s completely in.
 If the two region numbers both have a 1 in the same bit
  position, the line is completely out.
 Otherwise, we have to do some more calculations.
Cohen-Sutherland Clipping Algorithm
 For those lines that we cannot immediately
  determine, we successively clip against each
  boundary.
 Then check the new endpoint for its region
  code.
 How to find boundary intersection: To find
  y coordinate at vertical
  intersection, substitute x value at the
  boundary into the line equation of the line
  to be clipped.

More Related Content

What's hot

Clipping ( Cohen-Sutherland Algorithm )
Clipping ( Cohen-Sutherland Algorithm )Clipping ( Cohen-Sutherland Algorithm )
Clipping ( Cohen-Sutherland Algorithm )
Harshana Madusanka Jayamaha
 
Lect 5 2d clipping
Lect 5 2d clippingLect 5 2d clipping
Lect 5 2d clipping
majicyoung
 
Computer Graphic - Clipping
Computer Graphic - ClippingComputer Graphic - Clipping
Computer Graphic - Clipping
2013901097
 
Clipping 22
Clipping 22Clipping 22
Clipping 22
Lokesh Reddy
 
Polygon clipping
Polygon clippingPolygon clipping
Polygon clippingMohd Arif
 
Polygon clipping with sutherland hodgeman algorithm and scan line fill algorithm
Polygon clipping with sutherland hodgeman algorithm and scan line fill algorithmPolygon clipping with sutherland hodgeman algorithm and scan line fill algorithm
Polygon clipping with sutherland hodgeman algorithm and scan line fill algorithm
Mani Kanth
 
Bhavesh window clipping slidshare
Bhavesh window clipping slidshareBhavesh window clipping slidshare
Bhavesh window clipping slidshare
Bhavesh Panchal
 
Cohen and Sutherland Algorithm for 7-8 marks
Cohen and Sutherland Algorithm for 7-8 marksCohen and Sutherland Algorithm for 7-8 marks
Cohen and Sutherland Algorithm for 7-8 marks
Rehan Khan
 
Circle & curve clipping algorithm
Circle & curve clipping algorithmCircle & curve clipping algorithm
Circle & curve clipping algorithm
Mohamed El-Serngawy
 
Cohen sutherland line clipping
Cohen sutherland line clippingCohen sutherland line clipping
Cohen sutherland line clipping
Mani Kanth
 
Polygon clipping
Polygon clippingPolygon clipping
Polygon clipping
Ankit Garg
 
Cohen-Sutherland Line Clipping Algorithm
Cohen-Sutherland Line Clipping AlgorithmCohen-Sutherland Line Clipping Algorithm
Cohen-Sutherland Line Clipping Algorithm
Maruf Abdullah (Rion)
 
Line clipping algorithm (Detailed)
Line clipping algorithm (Detailed)Line clipping algorithm (Detailed)
Line clipping algorithm (Detailed)
Aamir Sohail
 
Clipping
ClippingClipping
Clipping
Pooja Dixit
 
2D viewing & clipping
2D viewing & clipping2D viewing & clipping
2D viewing & clipping
MdAlAmin187
 
Cohen sutherland algorithm
Cohen sutherland algorithmCohen sutherland algorithm
Cohen sutherland algorithm
Farwa Ansari
 

What's hot (20)

Clipping ( Cohen-Sutherland Algorithm )
Clipping ( Cohen-Sutherland Algorithm )Clipping ( Cohen-Sutherland Algorithm )
Clipping ( Cohen-Sutherland Algorithm )
 
Lect 5 2d clipping
Lect 5 2d clippingLect 5 2d clipping
Lect 5 2d clipping
 
Computer Graphic - Clipping
Computer Graphic - ClippingComputer Graphic - Clipping
Computer Graphic - Clipping
 
Clipping 22
Clipping 22Clipping 22
Clipping 22
 
Polygon clipping
Polygon clippingPolygon clipping
Polygon clipping
 
Polygon clipping with sutherland hodgeman algorithm and scan line fill algorithm
Polygon clipping with sutherland hodgeman algorithm and scan line fill algorithmPolygon clipping with sutherland hodgeman algorithm and scan line fill algorithm
Polygon clipping with sutherland hodgeman algorithm and scan line fill algorithm
 
Clipping2
Clipping2Clipping2
Clipping2
 
Bhavesh window clipping slidshare
Bhavesh window clipping slidshareBhavesh window clipping slidshare
Bhavesh window clipping slidshare
 
Cohen and Sutherland Algorithm for 7-8 marks
Cohen and Sutherland Algorithm for 7-8 marksCohen and Sutherland Algorithm for 7-8 marks
Cohen and Sutherland Algorithm for 7-8 marks
 
Circle & curve clipping algorithm
Circle & curve clipping algorithmCircle & curve clipping algorithm
Circle & curve clipping algorithm
 
Cohen sutherland line clipping
Cohen sutherland line clippingCohen sutherland line clipping
Cohen sutherland line clipping
 
Polygon clipping
Polygon clippingPolygon clipping
Polygon clipping
 
Cohen-Sutherland Line Clipping Algorithm
Cohen-Sutherland Line Clipping AlgorithmCohen-Sutherland Line Clipping Algorithm
Cohen-Sutherland Line Clipping Algorithm
 
Curve clipping
Curve clippingCurve clipping
Curve clipping
 
Polygon clipping
Polygon clippingPolygon clipping
Polygon clipping
 
Line clipping algorithm (Detailed)
Line clipping algorithm (Detailed)Line clipping algorithm (Detailed)
Line clipping algorithm (Detailed)
 
lecture8 clipping
lecture8 clippinglecture8 clipping
lecture8 clipping
 
Clipping
ClippingClipping
Clipping
 
2D viewing & clipping
2D viewing & clipping2D viewing & clipping
2D viewing & clipping
 
Cohen sutherland algorithm
Cohen sutherland algorithmCohen sutherland algorithm
Cohen sutherland algorithm
 

Similar to Clipping in 2 d

Clipping
ClippingClipping
Unit 4 notes
Unit 4 notesUnit 4 notes
Unit 4 notes
Balamurugan M
 
Clipping 22
Clipping 22Clipping 22
Clipping 22
lokesh503
 
99995327.ppt
99995327.ppt99995327.ppt
99995327.ppt
ABDULSAMADKAZI
 
Unit2- line clipping.pptx
Unit2- line clipping.pptxUnit2- line clipping.pptx
Unit2- line clipping.pptx
RYZEN14
 
Clipping
ClippingClipping
Clipping
AMIT VIRAMGAMI
 
Clipping.ppt
Clipping.pptClipping.ppt
Clipping.ppt
GrantejOtari1
 
Windowing clipping
Windowing   clippingWindowing   clipping
Windowing clipping
Shweta Shah
 
line clipping
line clipping line clipping
line clipping
Saurabh Soni
 
kgv.pptx
kgv.pptxkgv.pptx
kgv.pptx
sandeshbhusal6
 
Cohen sutherland line clipping algorithm
Cohen sutherland line clipping algorithmCohen sutherland line clipping algorithm
Cohen sutherland line clipping algorithm
Tawfiq Ahmed
 
Unit-IV Windowing and Clipping.pdf
Unit-IV Windowing and Clipping.pdfUnit-IV Windowing and Clipping.pdf
Unit-IV Windowing and Clipping.pdf
Amol Gaikwad
 
Computer graphics
Computer graphicsComputer graphics
Clipping
ClippingClipping
Clipping
Rajapriya82
 
Clipping
ClippingClipping
Clipping
nehrurevathy
 
Computer Graphics - Windowing and Clipping
Computer Graphics - Windowing and ClippingComputer Graphics - Windowing and Clipping
Computer Graphics - Windowing and Clipping
Chandrakant Divate
 
ibuib.pptx
ibuib.pptxibuib.pptx
ibuib.pptx
nabingyawali5
 
Polygon filling
Polygon fillingPolygon filling
Sutherlands Cohen and Hodgeman algorithms
Sutherlands Cohen and Hodgeman algorithmsSutherlands Cohen and Hodgeman algorithms
Sutherlands Cohen and Hodgeman algorithms
Rohit Jain
 
Cohen Sutherland line clipping algorithm
Cohen Sutherland line clipping algorithmCohen Sutherland line clipping algorithm
Cohen Sutherland line clipping algorithm
ansumanmahanty
 

Similar to Clipping in 2 d (20)

Clipping
ClippingClipping
Clipping
 
Unit 4 notes
Unit 4 notesUnit 4 notes
Unit 4 notes
 
Clipping 22
Clipping 22Clipping 22
Clipping 22
 
99995327.ppt
99995327.ppt99995327.ppt
99995327.ppt
 
Unit2- line clipping.pptx
Unit2- line clipping.pptxUnit2- line clipping.pptx
Unit2- line clipping.pptx
 
Clipping
ClippingClipping
Clipping
 
Clipping.ppt
Clipping.pptClipping.ppt
Clipping.ppt
 
Windowing clipping
Windowing   clippingWindowing   clipping
Windowing clipping
 
line clipping
line clipping line clipping
line clipping
 
kgv.pptx
kgv.pptxkgv.pptx
kgv.pptx
 
Cohen sutherland line clipping algorithm
Cohen sutherland line clipping algorithmCohen sutherland line clipping algorithm
Cohen sutherland line clipping algorithm
 
Unit-IV Windowing and Clipping.pdf
Unit-IV Windowing and Clipping.pdfUnit-IV Windowing and Clipping.pdf
Unit-IV Windowing and Clipping.pdf
 
Computer graphics
Computer graphicsComputer graphics
Computer graphics
 
Clipping
ClippingClipping
Clipping
 
Clipping
ClippingClipping
Clipping
 
Computer Graphics - Windowing and Clipping
Computer Graphics - Windowing and ClippingComputer Graphics - Windowing and Clipping
Computer Graphics - Windowing and Clipping
 
ibuib.pptx
ibuib.pptxibuib.pptx
ibuib.pptx
 
Polygon filling
Polygon fillingPolygon filling
Polygon filling
 
Sutherlands Cohen and Hodgeman algorithms
Sutherlands Cohen and Hodgeman algorithmsSutherlands Cohen and Hodgeman algorithms
Sutherlands Cohen and Hodgeman algorithms
 
Cohen Sutherland line clipping algorithm
Cohen Sutherland line clipping algorithmCohen Sutherland line clipping algorithm
Cohen Sutherland line clipping algorithm
 

Recently uploaded

The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
Vivekanand Anglo Vedic Academy
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
JosvitaDsouza2
 
678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf
CarlosHernanMontoyab2
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
Balvir Singh
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
Celine George
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
Special education needs
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
Celine George
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
vaibhavrinwa19
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
Jheel Barad
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
Sandy Millin
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
Jisc
 
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCECLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
BhavyaRajput3
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
TechSoup
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
RaedMohamed3
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
camakaiclarkmusic
 
The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
GeoBlogs
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
EverAndrsGuerraGuerr
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
Peter Windle
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
joachimlavalley1
 
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdfAdversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Po-Chuan Chen
 

Recently uploaded (20)

The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
 
678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
 
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCECLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
 
The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
 
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdfAdversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
 

Clipping in 2 d

  • 1. CLIPPING IN 2D BY.. ASHIV KHAN JOHNSON ASTIN DEVAHARI
  • 2. 2D CLIPPING  Any procedure which identifies that portion of a picture which is either inside or outside a region is referred to as a clipping algorithm or clipping.  The region against which an object is to be clipped is called clipping window.
  • 3. 2D Clipping  Point clipping easy: Just check the inequalities  xmin < x < xmax  ymin < y < ymax  Line clipping more tricky
  • 4. Cohen Sutherland clipping Algorithm  The Cohen–Sutherland algorithm is a computer graphics algorithm used for line clipping
  • 5. Cohen Sutherland clipping Algorithm  Every line endpoint is assigned a 4 bit Region code. The appropriate bit is set depending on the location of the endpoint with respect to that window component as shown below:  Endpoint Left of window then set bit 1  Endpoint Right of window then set bit 2  Endpoint Below window then set bit 3  Endpoint Above window then set bit 4
  • 6. Cohen-Sutherland Line Clipping  To clip a line, find out which regions its two endpoints lie in.  If they are both in region 0000, then it’s completely in.  If the two region numbers both have a 1 in the same bit position, the line is completely out.  Otherwise, we have to do some more calculations.
  • 7. Cohen-Sutherland clipping algorithm  To clip a line, find out which regions its two endpoints lie in.  If they are both in region 0000, then it’s completely in.  If the two region numbers both have a 1 in the same bit position, the line is completely out.  Otherwise, we have to do some more calculations.
  • 8. Cohen-Sutherland Clipping Algorithm  For those lines that we cannot immediately determine, we successively clip against each boundary.  Then check the new endpoint for its region code.  How to find boundary intersection: To find y coordinate at vertical intersection, substitute x value at the boundary into the line equation of the line to be clipped.