SlideShare a Scribd company logo
Sutherland-Hodgman Area Clipping Algorithm
A technique for clipping areas developed by Sutherland &
Hodgman
Put simply the polygon is clipped by comparing it against
each boundary in turn
Original Area Clip Left Clip Right Clip Top Clip Bottom
Prof. Jeo Joy A, Dept. of Computer Science UG, Kristu jayanti
College(Autonomous) Bengaluru
Left
Clipper
Right
Clipper
Bottom
Clipper
Top Clipper
At each step, a new sequence of
output vertices is generated and
passed to the next window
boundary clipper.
Prof. Jeo Joy A, Dept. of Computer Science UG, Kristu jayanti
College(Autonomous) Bengaluru
Sutherland-Hodgman Polygon Clipping
There are four possible cases when
processing vertices in sequence around the
perimeter of a polygon.
As each pair of adjacent polygon vertices
is passed to a next window boundary clipper,
we make the following tests:
Prof. Jeo Joy A, Dept. of Computer Science UG, Kristu jayanti
College(Autonomous) Bengaluru
1. If the first vertex is outside the window
boundary and the second vertex is inside
Then , both the intersection point of the polygon
edge with the window boundary and the
second vertex are added to the output vertex
list.
Prof. Jeo Joy A, Dept. of Computer Science UG, Kristu jayanti
College(Autonomous) Bengaluru
2. If both input vertices are inside the
window boundary.
Then, only the second vertex is added to
the output vertex list.
Prof. Jeo Joy A, Dept. of Computer Science UG, Kristu jayanti
College(Autonomous) Bengaluru
3. If the first vertex is inside the window
boundary and the second vertex is outside.
Then, only the edge intersection with the window
boundary is added to the output vertex list.
Prof. Jeo Joy A, Dept. of Computer Science UG, Kristu jayanti
College(Autonomous) Bengaluru
4. If both input vertices are outside the
window boundary.
Then, nothing is added to the output vertex
list.
Prof. Jeo Joy A, Dept. of Computer Science UG, Kristu jayanti
College(Autonomous) Bengaluru
Prof. Jeo Joy A, Dept. of Computer Science UG, Kristu jayanti
College(Autonomous) Bengaluru
Sutherland-Hodgman Polygon Clipping (Example)
We illustrate this algorithm by processing the area
in figure against the left window boundary.
Vertices 1 and 2 are outside of the
boundary.
Vertex 3, which is inside, 1' and vertex
3 are saved.
Vertex 4 and 5 are inside, and they
also saved.
Vertex 6 is outside, 5' is saved.
Using the five saved points, we would
repeat the process for the next
window boundary.
Prof. Jeo Joy A, Dept. of Computer Science UG, Kristu jayanti
College(Autonomous) Bengaluru
To clip an area against an individual boundary:
• Consider each vertex in turn against the
boundary
• Vertices inside the boundary are saved for
clipping against the next boundary
• Vertices outside the boundary are clipped
• If we proceed from a point inside the
boundary to one outside, the intersection of
the line with the boundary is saved
• If we cross from the outside to the inside
intersection point and the vertex are saved
Prof. Jeo Joy A, Dept. of Computer Science UG, Kristu jayanti
College(Autonomous) Bengaluru
Sutherland-Hodgman Example
Each example shows the
point being processed
(P) and the previous
point (S)
Saved points define area
clipped to the boundary
in question
S
P
Save Point P
S
P
Save Point I
I
P
S
No Points Saved
S
P
Save Points I & P
I
Prof. Jeo Joy A, Dept. of Computer Science UG, Kristu jayanti
College(Autonomous) Bengaluru

More Related Content

Similar to Sutherland Hodgman Polygon Clipping Technique.pptx

ytsju.pptx
ytsju.pptxytsju.pptx
ytsju.pptx
nabingyawali5
 
Linear Search Swapping Bubble Sort Binary Search.pptx
Linear Search Swapping Bubble Sort Binary Search.pptxLinear Search Swapping Bubble Sort Binary Search.pptx
Linear Search Swapping Bubble Sort Binary Search.pptx
JeoJoyA
 
ufyty.pptx
ufyty.pptxufyty.pptx
ufyty.pptx
nabingyawali5
 
yyfty.pptx
yyfty.pptxyyfty.pptx
yyfty.pptx
nabingyawali5
 
jd.pptx
jd.pptxjd.pptx
jd.pptx
nabingyawali5
 
Hidden surface removal
Hidden surface removalHidden surface removal
Hidden surface removal
Ankit Garg
 
hgfcgf.pptx
hgfcgf.pptxhgfcgf.pptx
hgfcgf.pptx
nabingyawali5
 
hgfcftc.pptx
hgfcftc.pptxhgfcftc.pptx
hgfcftc.pptx
nabingyawali5
 
OpenGL
OpenGLOpenGL
OpenGL
JeoJoyA
 
Ds33717725
Ds33717725Ds33717725
Ds33717725
IJERA Editor
 
Ds33717725
Ds33717725Ds33717725
Ds33717725
IJERA Editor
 
Sutherland hodgman polygon clipping algorithm
Sutherland hodgman polygon clipping algorithmSutherland hodgman polygon clipping algorithm
Sutherland hodgman polygon clipping algorithm
Tawfiq Ahmed
 

Similar to Sutherland Hodgman Polygon Clipping Technique.pptx (12)

ytsju.pptx
ytsju.pptxytsju.pptx
ytsju.pptx
 
Linear Search Swapping Bubble Sort Binary Search.pptx
Linear Search Swapping Bubble Sort Binary Search.pptxLinear Search Swapping Bubble Sort Binary Search.pptx
Linear Search Swapping Bubble Sort Binary Search.pptx
 
ufyty.pptx
ufyty.pptxufyty.pptx
ufyty.pptx
 
yyfty.pptx
yyfty.pptxyyfty.pptx
yyfty.pptx
 
jd.pptx
jd.pptxjd.pptx
jd.pptx
 
Hidden surface removal
Hidden surface removalHidden surface removal
Hidden surface removal
 
hgfcgf.pptx
hgfcgf.pptxhgfcgf.pptx
hgfcgf.pptx
 
hgfcftc.pptx
hgfcftc.pptxhgfcftc.pptx
hgfcftc.pptx
 
OpenGL
OpenGLOpenGL
OpenGL
 
Ds33717725
Ds33717725Ds33717725
Ds33717725
 
Ds33717725
Ds33717725Ds33717725
Ds33717725
 
Sutherland hodgman polygon clipping algorithm
Sutherland hodgman polygon clipping algorithmSutherland hodgman polygon clipping algorithm
Sutherland hodgman polygon clipping algorithm
 

More from JeoJoyA

Tree (1).pptx
Tree (1).pptxTree (1).pptx
Tree (1).pptx
JeoJoyA
 
Segment Structure Display List in Computer Graphics.pptx
Segment Structure Display List in Computer Graphics.pptxSegment Structure Display List in Computer Graphics.pptx
Segment Structure Display List in Computer Graphics.pptx
JeoJoyA
 
Recursion Merge Sort Quick Sort.pptx
Recursion Merge Sort Quick Sort.pptxRecursion Merge Sort Quick Sort.pptx
Recursion Merge Sort Quick Sort.pptx
JeoJoyA
 
Tree.pptx
Tree.pptxTree.pptx
Tree.pptx
JeoJoyA
 
Linear and binary search
Linear and binary searchLinear and binary search
Linear and binary search
JeoJoyA
 
Linked list
Linked listLinked list
Linked list
JeoJoyA
 
Tree
TreeTree
Tree
JeoJoyA
 

More from JeoJoyA (7)

Tree (1).pptx
Tree (1).pptxTree (1).pptx
Tree (1).pptx
 
Segment Structure Display List in Computer Graphics.pptx
Segment Structure Display List in Computer Graphics.pptxSegment Structure Display List in Computer Graphics.pptx
Segment Structure Display List in Computer Graphics.pptx
 
Recursion Merge Sort Quick Sort.pptx
Recursion Merge Sort Quick Sort.pptxRecursion Merge Sort Quick Sort.pptx
Recursion Merge Sort Quick Sort.pptx
 
Tree.pptx
Tree.pptxTree.pptx
Tree.pptx
 
Linear and binary search
Linear and binary searchLinear and binary search
Linear and binary search
 
Linked list
Linked listLinked list
Linked list
 
Tree
TreeTree
Tree
 

Recently uploaded

Guidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th SemesterGuidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Atul Kumar Singh
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
RaedMohamed3
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
Ashokrao Mane college of Pharmacy Peth-Vadgaon
 
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
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Thiyagu K
 
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
 
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
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
EugeneSaldivar
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
TechSoup
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
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
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
DeeptiGupta154
 
Polish students' mobility in the Czech Republic
Polish students' mobility in the Czech RepublicPolish students' mobility in the Czech Republic
Polish students' mobility in the Czech Republic
Anna Sz.
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
Atul Kumar Singh
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
MIRIAMSALINAS13
 
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
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
Jean Carlos Nunes Paixão
 
Embracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic ImperativeEmbracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic Imperative
Peter Windle
 
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
 

Recently uploaded (20)

Guidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th SemesterGuidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th Semester
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
 
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
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
 
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
 
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
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.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
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
 
Polish students' mobility in the Czech Republic
Polish students' mobility in the Czech RepublicPolish students' mobility in the Czech Republic
Polish students' mobility in the Czech Republic
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
 
Embracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic ImperativeEmbracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic Imperative
 
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
 

Sutherland Hodgman Polygon Clipping Technique.pptx

  • 1. Sutherland-Hodgman Area Clipping Algorithm A technique for clipping areas developed by Sutherland & Hodgman Put simply the polygon is clipped by comparing it against each boundary in turn Original Area Clip Left Clip Right Clip Top Clip Bottom Prof. Jeo Joy A, Dept. of Computer Science UG, Kristu jayanti College(Autonomous) Bengaluru
  • 2. Left Clipper Right Clipper Bottom Clipper Top Clipper At each step, a new sequence of output vertices is generated and passed to the next window boundary clipper. Prof. Jeo Joy A, Dept. of Computer Science UG, Kristu jayanti College(Autonomous) Bengaluru
  • 3. Sutherland-Hodgman Polygon Clipping There are four possible cases when processing vertices in sequence around the perimeter of a polygon. As each pair of adjacent polygon vertices is passed to a next window boundary clipper, we make the following tests: Prof. Jeo Joy A, Dept. of Computer Science UG, Kristu jayanti College(Autonomous) Bengaluru
  • 4. 1. If the first vertex is outside the window boundary and the second vertex is inside Then , both the intersection point of the polygon edge with the window boundary and the second vertex are added to the output vertex list. Prof. Jeo Joy A, Dept. of Computer Science UG, Kristu jayanti College(Autonomous) Bengaluru
  • 5. 2. If both input vertices are inside the window boundary. Then, only the second vertex is added to the output vertex list. Prof. Jeo Joy A, Dept. of Computer Science UG, Kristu jayanti College(Autonomous) Bengaluru
  • 6. 3. If the first vertex is inside the window boundary and the second vertex is outside. Then, only the edge intersection with the window boundary is added to the output vertex list. Prof. Jeo Joy A, Dept. of Computer Science UG, Kristu jayanti College(Autonomous) Bengaluru
  • 7. 4. If both input vertices are outside the window boundary. Then, nothing is added to the output vertex list. Prof. Jeo Joy A, Dept. of Computer Science UG, Kristu jayanti College(Autonomous) Bengaluru
  • 8. Prof. Jeo Joy A, Dept. of Computer Science UG, Kristu jayanti College(Autonomous) Bengaluru
  • 9. Sutherland-Hodgman Polygon Clipping (Example) We illustrate this algorithm by processing the area in figure against the left window boundary. Vertices 1 and 2 are outside of the boundary. Vertex 3, which is inside, 1' and vertex 3 are saved. Vertex 4 and 5 are inside, and they also saved. Vertex 6 is outside, 5' is saved. Using the five saved points, we would repeat the process for the next window boundary. Prof. Jeo Joy A, Dept. of Computer Science UG, Kristu jayanti College(Autonomous) Bengaluru
  • 10. To clip an area against an individual boundary: • Consider each vertex in turn against the boundary • Vertices inside the boundary are saved for clipping against the next boundary • Vertices outside the boundary are clipped • If we proceed from a point inside the boundary to one outside, the intersection of the line with the boundary is saved • If we cross from the outside to the inside intersection point and the vertex are saved Prof. Jeo Joy A, Dept. of Computer Science UG, Kristu jayanti College(Autonomous) Bengaluru
  • 11. Sutherland-Hodgman Example Each example shows the point being processed (P) and the previous point (S) Saved points define area clipped to the boundary in question S P Save Point P S P Save Point I I P S No Points Saved S P Save Points I & P I Prof. Jeo Joy A, Dept. of Computer Science UG, Kristu jayanti College(Autonomous) Bengaluru