SlideShare a Scribd company logo
 Generally, any procedure, that identifies
that portion of a picture that are either
inside or outside of a specified region of
a space is referred as a clipping
algorithm or simply clipping.
 Clipping a polygon fill area needs more than line-clipping of
the polygon edges
-would produce and unconnected set of lines
 Must generate one or more closed polylines, which can be
filled with the assigned color or pattern
 Each edge of the polygon must be tested
against each edge of the clip rectangle;
new edges must be added, and existing
edges must be discarded, retained, or
divided. Multiple polygons may result
from clipping a single polygon. We need
an organized way to deal with all these
cases.
 Each edge goes through 4 clippers. The
rule for each edge for each clipper is:
 If first input vertex is outside, and
second is inside, output the
intersection and the second vertex
 If first both input vertices are inside,
then just output second vertex
 If first input vertex is inside, and
second is outside, output is the
intersection
 If both vertices are outside, output is
nothing
Polygons can be clipped against each
edge of the window one at a time.
Vertices which are kept after clipping
against one window edge are saved
for clipping against the remaining
edges.
Note that the number of vertices
usually changes and will often
increases.
 The Sutherland-Hodgman algorithm
correctly clips convex polygons, but
concave polygons may be displayed
with extraneous lines as
demonstrated in figure.

 Since there is only one output vertex
list, the last vertex in the list is
always joined to the first vertex.
 Complexity of this algorithm will increase if number of edges of polygon increase.
Algorithm has to calculate more number of intersection points over window
boundary.
 To overcome this problem we apply Weiler-Atherton Polygon Clipping Algorithm.
Sutherland hodgman polygon clipping algorithm

More Related Content

What's hot

Clipping
ClippingClipping
Clipping
AMIT VIRAMGAMI
 
Character generation
Character generationCharacter generation
Character generation
Ankit Garg
 
Polygon filling
Polygon fillingPolygon filling
Polygon filling
Polygon fillingPolygon filling
Polygon filling
Ankit Garg
 
I. AO* SEARCH ALGORITHM
I. AO* SEARCH ALGORITHMI. AO* SEARCH ALGORITHM
I. AO* SEARCH ALGORITHM
vikas dhakane
 
Polygon clipping
Polygon clippingPolygon clipping
Polygon clipping
Ankit Garg
 
Data structure - Graph
Data structure - GraphData structure - Graph
Data structure - Graph
Madhu Bala
 
Polygon filling algorithm
Polygon filling algorithmPolygon filling algorithm
Polygon filling algorithm
Aparna Joshi
 
Error detection & correction codes
Error detection & correction codesError detection & correction codes
Error detection & correction codes
Revathi Subramaniam
 
Data encoding and modulation
Data encoding and modulationData encoding and modulation
Data encoding and modulation
Shankar Gangaju
 
Clipping
ClippingClipping
Clipping
Pooja Dixit
 
Galois field
Galois fieldGalois field
Galois field
Niaj Morshed
 
Shortest path algorithm
Shortest  path algorithmShortest  path algorithm
Shortest path algorithm
Subrata Kumer Paul
 
Cohen-Sutherland Line Clipping Algorithm
Cohen-Sutherland Line Clipping AlgorithmCohen-Sutherland Line Clipping Algorithm
Cohen-Sutherland Line Clipping Algorithm
Maruf Abdullah (Rion)
 
Segments in Graphics
Segments in GraphicsSegments in Graphics
Segments in Graphics
Rajani Thite
 
Polygon clipping
Polygon clippingPolygon clipping
Polygon clipping
Vikas Sharma
 
Cyrus beck line clipping algorithm
Cyrus beck line clipping algorithmCyrus beck line clipping algorithm
Cyrus beck line clipping algorithm
Pooja Dixit
 
Topological Sorting
Topological SortingTopological Sorting
Topological Sorting
ShahDhruv21
 

What's hot (20)

Curve clipping
Curve clippingCurve clipping
Curve clipping
 
Clipping
ClippingClipping
Clipping
 
Character generation
Character generationCharacter generation
Character generation
 
Polygon filling
Polygon fillingPolygon filling
Polygon filling
 
Polygon filling
Polygon fillingPolygon filling
Polygon filling
 
I. AO* SEARCH ALGORITHM
I. AO* SEARCH ALGORITHMI. AO* SEARCH ALGORITHM
I. AO* SEARCH ALGORITHM
 
Polygon clipping
Polygon clippingPolygon clipping
Polygon clipping
 
Data structure - Graph
Data structure - GraphData structure - Graph
Data structure - Graph
 
Polygon filling algorithm
Polygon filling algorithmPolygon filling algorithm
Polygon filling algorithm
 
Error detection & correction codes
Error detection & correction codesError detection & correction codes
Error detection & correction codes
 
Data encoding and modulation
Data encoding and modulationData encoding and modulation
Data encoding and modulation
 
Clipping
ClippingClipping
Clipping
 
Galois field
Galois fieldGalois field
Galois field
 
Shortest path algorithm
Shortest  path algorithmShortest  path algorithm
Shortest path algorithm
 
Cohen-Sutherland Line Clipping Algorithm
Cohen-Sutherland Line Clipping AlgorithmCohen-Sutherland Line Clipping Algorithm
Cohen-Sutherland Line Clipping Algorithm
 
Segments in Graphics
Segments in GraphicsSegments in Graphics
Segments in Graphics
 
Polygon clipping
Polygon clippingPolygon clipping
Polygon clipping
 
Cyrus beck line clipping algorithm
Cyrus beck line clipping algorithmCyrus beck line clipping algorithm
Cyrus beck line clipping algorithm
 
Topological Sorting
Topological SortingTopological Sorting
Topological Sorting
 
Vector quantization
Vector quantizationVector quantization
Vector quantization
 

Similar to Sutherland hodgman polygon clipping algorithm

Clipping computer graphics
Clipping  computer graphicsClipping  computer graphics
Clipping computer graphics
ShaishavShah8
 
ibuib.pptx
ibuib.pptxibuib.pptx
ibuib.pptx
nabingyawali5
 
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
Lahiru Danushka
 
ytt.pptx
ytt.pptxytt.pptx
ytt.pptx
nabingyawali5
 
Clipping
ClippingClipping
Clipping
Akash Gupta
 
iuyf.pptx
iuyf.pptxiuyf.pptx
iuyf.pptx
nabingyawali5
 
99995327.ppt
99995327.ppt99995327.ppt
99995327.ppt
ABDULSAMADKAZI
 
jfcft.pptx
jfcft.pptxjfcft.pptx
jfcft.pptx
nabingyawali5
 
kfty.pptx
kfty.pptxkfty.pptx
kfty.pptx
nabingyawali5
 
ufyty.pptx
ufyty.pptxufyty.pptx
ufyty.pptx
nabingyawali5
 
hgfcftc.pptx
hgfcftc.pptxhgfcftc.pptx
hgfcftc.pptx
nabingyawali5
 
jd.pptx
jd.pptxjd.pptx
jd.pptx
nabingyawali5
 
yyfty.pptx
yyfty.pptxyyfty.pptx
yyfty.pptx
nabingyawali5
 
yutd65.pptx
yutd65.pptxyutd65.pptx
yutd65.pptx
nabingyawali5
 
ytsju.pptx
ytsju.pptxytsju.pptx
ytsju.pptx
nabingyawali5
 
hgfcgf.pptx
hgfcgf.pptxhgfcgf.pptx
hgfcgf.pptx
nabingyawali5
 
ohu.pptx
ohu.pptxohu.pptx
ohu.pptx
nabingyawali5
 
kgv.pptx
kgv.pptxkgv.pptx
kgv.pptx
sandeshbhusal6
 

Similar to Sutherland hodgman polygon clipping algorithm (20)

Clipping computer graphics
Clipping  computer graphicsClipping  computer graphics
Clipping computer graphics
 
ibuib.pptx
ibuib.pptxibuib.pptx
ibuib.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
 
ytt.pptx
ytt.pptxytt.pptx
ytt.pptx
 
Clipping
ClippingClipping
Clipping
 
iuyf.pptx
iuyf.pptxiuyf.pptx
iuyf.pptx
 
99995327.ppt
99995327.ppt99995327.ppt
99995327.ppt
 
ytdty.pptx
ytdty.pptxytdty.pptx
ytdty.pptx
 
jfcft.pptx
jfcft.pptxjfcft.pptx
jfcft.pptx
 
kfty.pptx
kfty.pptxkfty.pptx
kfty.pptx
 
ufyty.pptx
ufyty.pptxufyty.pptx
ufyty.pptx
 
Clipping2
Clipping2Clipping2
Clipping2
 
hgfcftc.pptx
hgfcftc.pptxhgfcftc.pptx
hgfcftc.pptx
 
jd.pptx
jd.pptxjd.pptx
jd.pptx
 
yyfty.pptx
yyfty.pptxyyfty.pptx
yyfty.pptx
 
yutd65.pptx
yutd65.pptxyutd65.pptx
yutd65.pptx
 
ytsju.pptx
ytsju.pptxytsju.pptx
ytsju.pptx
 
hgfcgf.pptx
hgfcgf.pptxhgfcgf.pptx
hgfcgf.pptx
 
ohu.pptx
ohu.pptxohu.pptx
ohu.pptx
 
kgv.pptx
kgv.pptxkgv.pptx
kgv.pptx
 

Recently uploaded

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
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
heathfieldcps1
 
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
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
Delapenabediema
 
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
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
Tamralipta Mahavidyalaya
 
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
 
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
 
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
 
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
 
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
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
Jisc
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
Nguyen Thanh Tu Collection
 
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
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
beazzy04
 
Francesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptxFrancesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptx
EduSkills OECD
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
MysoreMuleSoftMeetup
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
RaedMohamed3
 
"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
SACHIN R KONDAGURI
 
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
 

Recently uploaded (20)

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
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
 
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
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
 
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
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.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
 
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 ...
 
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
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
 
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
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
 
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
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
 
Francesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptxFrancesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptx
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
 
"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
 
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
 

Sutherland hodgman polygon clipping algorithm

  • 1.  Generally, any procedure, that identifies that portion of a picture that are either inside or outside of a specified region of a space is referred as a clipping algorithm or simply clipping.
  • 2.  Clipping a polygon fill area needs more than line-clipping of the polygon edges -would produce and unconnected set of lines  Must generate one or more closed polylines, which can be filled with the assigned color or pattern
  • 3.  Each edge of the polygon must be tested against each edge of the clip rectangle; new edges must be added, and existing edges must be discarded, retained, or divided. Multiple polygons may result from clipping a single polygon. We need an organized way to deal with all these cases.
  • 4.  Each edge goes through 4 clippers. The rule for each edge for each clipper is:  If first input vertex is outside, and second is inside, output the intersection and the second vertex  If first both input vertices are inside, then just output second vertex  If first input vertex is inside, and second is outside, output is the intersection  If both vertices are outside, output is nothing
  • 5. Polygons can be clipped against each edge of the window one at a time. Vertices which are kept after clipping against one window edge are saved for clipping against the remaining edges. Note that the number of vertices usually changes and will often increases.
  • 6.
  • 7.
  • 8.  The Sutherland-Hodgman algorithm correctly clips convex polygons, but concave polygons may be displayed with extraneous lines as demonstrated in figure.   Since there is only one output vertex list, the last vertex in the list is always joined to the first vertex.
  • 9.  Complexity of this algorithm will increase if number of edges of polygon increase. Algorithm has to calculate more number of intersection points over window boundary.  To overcome this problem we apply Weiler-Atherton Polygon Clipping Algorithm.