SlideShare a Scribd company logo
Polygon Clipping When a closed polygon is clipped as a collection of lines, the original closed polygon becomes one or more open polygons or discrete lines . For polygon clipping we require an algorithm that will generate one or more closed areas. The output of a polygon clippers be a sequence of vertices that defines the clipped polygon boundary.
Sutherland Hodgeman Algorithm We can correctly clip a polygon by processing a polygon boundary as a whole against each window edge. This could be accomplished by processing all polygon vertices against each clip rectangle boundary. Beginning with the initial set of polygon vertices, we could first clip against the left rectangle boundary to procedure a new sequence of vertices.
Sutherland Hodgeman Algorithm The new set of vertices could than be successively passed to a right boundary clipper, a bottom boundary clipper, & a top boundary clipper. At each step a new sequence of output vertices is generated & passed to the next window boundary clipper. These are four possible cases when processing vertices in sequence around the perimeter of a polygon.
Sutherland Hodgeman Algorithm Left Clipper Right Clipper Bottom Clipper Top Clipper
Sutherland Hodgeman Algorithm As each pair of adjacent polygon vertices is passed to a window boundary clipper we make the following tests. * If the first vertex is outside the window boundary  & the second vertex is inside, the intersection  point of the polygon edge with the window  boundary & the second vertex are added  to the output vertex list. V1 V2 V1’ Out – In Save V1’, V2
Sutherland Hodgeman Algorithm * If both input vertices are inside the window  boundary only the second vertex is added to the  output vertex list. V1 V2 In – Out Save  V2
Sutherland Hodgeman Algorithm *  If the vertex is inside the window boundary & the second vertex is outside; only the edge intersection with the window boundary is added to the output vertex list   V1 V2 In – Out Save V2’ V2’
Sutherland Hodgeman Algorithm *  If both input vertices are outside the window boundary, nothing is added to the output list. V1 V2 Save None
Sutherland Hodgeman Algorithm Left Edge List a’bcdefghii’ Right Edge List bcdd’e’fghii’a’ Bottom Edge List cdd’e’ff’h’ii’a’b Top Edge List c’dd’e’ff’h’ii’a’bb’ a a’ b b’ c c’ d d’ e e’ f f’ g h h’ i i’
Sutherland Hodgeman Algorithm Convex polygon are correctly clipped by the Sutherland-Hodgeman algorithm but concave polygon may be displayed with extraneous lines. This is occur when the clipped polygon should have two or more separate section. Since there is only one output vertex list, the last vertex in the list is always joined to the first vertex list
Weiler-Atherlton Polygon Clipping In this method, vertex processing procedures for window boundaries are modified so that concave polygons are displayed correctly. This clipping procedure was developed as a method for identifying visible surfaces, & so it can be applied with arbitrary polygon clipping regions. The basic idea in this algorithm is that instead of always processing around the polygon edges as vertices are processed, we some times want to follow the window boundaries.
Weiler-Atherlton Polygon Clipping Which path we follow depends on the polygon processing directions (clockwise or counter clockwise) & whether the pair of polygon vertices currently being processed represented an  outside to inside  pair or an  inside to outside  pair. For an outside to inside pair of vertices, follow the polygon boundary. For an inside to outside pair of vertices, follow the window boundary in a clockwise direction.
Weiler-Atherlton Polygon Clipping Concave Polygon V1 V1’ V2 V3 V3’ V4 V4’ V5 V5’ V6
Weiler-Atherlton Polygon Clipping c1 c2 c3 c4 s1 s2 s3 s4 s5 s6 s7 I1 I2 I3 I4 I5 I6 I7 I8 Subject Polygon Clip Polygon
Weiler-Atherlton Polygon Clipping Subject Polygon List   Clip Polygon List  s1 c1 I2 I1 I3 I2 s2 c2 I4 I3 s3 I4 I5 c3 s4 I5 I6 I6 I7 c4 s5 I7 I8 I8 s6 c1 I1 s7 s1

More Related Content

PPTX
Css box-model
PPT
Boundary fill algm
PPTX
The sutherland hodgeman polygon clipping algorithm
PPT
Polygon clipping
PDF
PPTX
Insertion operation in array(ds)
PPTX
Presentation on data preparation with pandas
Css box-model
Boundary fill algm
The sutherland hodgeman polygon clipping algorithm
Polygon clipping
Insertion operation in array(ds)
Presentation on data preparation with pandas

What's hot (20)

PPT
BINARY TREE REPRESENTATION.ppt
PDF
Implementation of k means algorithm on Hadoop
PPTX
Threaded Binary Tree
PPT
PPTX
Threaded Binary Tree.pptx
PPTX
Stack using Linked List
PPT
3d Projection
PPTX
Singly & Circular Linked list
PDF
Data structure lab manual
PPTX
PDF
CSS Day: CSS Grid Layout
PPT
Polygon clipping
PPT
Circular linked list
PDF
Fundamentals of data structures ellis horowitz & sartaj sahni
PPTX
Lesson-7-Priority-Queues-and-Heap-Trees-1.pptx
PPTX
Graph traversals in Data Structures
PDF
UNIT II LINEAR DATA STRUCTURES – STACKS, QUEUES
PPTX
String Builder & String Buffer (Java Programming)
PPT
Inheritance in c++ ppt (Powerpoint) | inheritance in c++ ppt presentation | i...
PPTX
Inheritance In C++ (Object Oriented Programming)
BINARY TREE REPRESENTATION.ppt
Implementation of k means algorithm on Hadoop
Threaded Binary Tree
Threaded Binary Tree.pptx
Stack using Linked List
3d Projection
Singly & Circular Linked list
Data structure lab manual
CSS Day: CSS Grid Layout
Polygon clipping
Circular linked list
Fundamentals of data structures ellis horowitz & sartaj sahni
Lesson-7-Priority-Queues-and-Heap-Trees-1.pptx
Graph traversals in Data Structures
UNIT II LINEAR DATA STRUCTURES – STACKS, QUEUES
String Builder & String Buffer (Java Programming)
Inheritance in c++ ppt (Powerpoint) | inheritance in c++ ppt presentation | i...
Inheritance In C++ (Object Oriented Programming)
Ad

Similar to Clipping2 (20)

PDF
M.Sc_.-IV_ComputerGraphics_PolygonClipping_Bhupendra_K_Pandya.pdf
PPTX
yyfty.pptx
PPTX
hgfcgf.pptx
PPTX
hgfcftc.pptx
PPTX
jd.pptx
PPTX
ufyty.pptx
PPTX
jfcft.pptx
PPTX
ytsju.pptx
PPTX
Sutherland hodgman polygon clipping algorithm
PPTX
kfty.pptx
PPTX
iuyf.pptx
PPTX
ytdty.pptx
PPT
Clipping
PPTX
Liang- Barsky Algorithm, Polygon clipping & pipeline clipping of polygons
PPTX
ibuib.pptx
PPTX
ohu.pptx
PPT
99995327.ppt
PPTX
Clipping
PPT
Windowing clipping
PPTX
Clipping
M.Sc_.-IV_ComputerGraphics_PolygonClipping_Bhupendra_K_Pandya.pdf
yyfty.pptx
hgfcgf.pptx
hgfcftc.pptx
jd.pptx
ufyty.pptx
jfcft.pptx
ytsju.pptx
Sutherland hodgman polygon clipping algorithm
kfty.pptx
iuyf.pptx
ytdty.pptx
Clipping
Liang- Barsky Algorithm, Polygon clipping & pipeline clipping of polygons
ibuib.pptx
ohu.pptx
99995327.ppt
Clipping
Windowing clipping
Clipping
Ad

Recently uploaded (20)

PPTX
1. Introduction to Computer Programming.pptx
PDF
TrustArc Webinar - Click, Consent, Trust: Winning the Privacy Game
PDF
Developing a website for English-speaking practice to English as a foreign la...
PDF
August Patch Tuesday
PPTX
TLE Review Electricity (Electricity).pptx
PPTX
cloud_computing_Infrastucture_as_cloud_p
PPTX
The various Industrial Revolutions .pptx
PDF
project resource management chapter-09.pdf
PDF
NewMind AI Weekly Chronicles – August ’25 Week III
PDF
1 - Historical Antecedents, Social Consideration.pdf
PDF
Getting Started with Data Integration: FME Form 101
PDF
gpt5_lecture_notes_comprehensive_20250812015547.pdf
PDF
From MVP to Full-Scale Product A Startup’s Software Journey.pdf
PPT
What is a Computer? Input Devices /output devices
PDF
DASA ADMISSION 2024_FirstRound_FirstRank_LastRank.pdf
PPTX
Group 1 Presentation -Planning and Decision Making .pptx
PDF
Hindi spoken digit analysis for native and non-native speakers
PDF
Univ-Connecticut-ChatGPT-Presentaion.pdf
PDF
A comparative study of natural language inference in Swahili using monolingua...
PDF
Hybrid model detection and classification of lung cancer
1. Introduction to Computer Programming.pptx
TrustArc Webinar - Click, Consent, Trust: Winning the Privacy Game
Developing a website for English-speaking practice to English as a foreign la...
August Patch Tuesday
TLE Review Electricity (Electricity).pptx
cloud_computing_Infrastucture_as_cloud_p
The various Industrial Revolutions .pptx
project resource management chapter-09.pdf
NewMind AI Weekly Chronicles – August ’25 Week III
1 - Historical Antecedents, Social Consideration.pdf
Getting Started with Data Integration: FME Form 101
gpt5_lecture_notes_comprehensive_20250812015547.pdf
From MVP to Full-Scale Product A Startup’s Software Journey.pdf
What is a Computer? Input Devices /output devices
DASA ADMISSION 2024_FirstRound_FirstRank_LastRank.pdf
Group 1 Presentation -Planning and Decision Making .pptx
Hindi spoken digit analysis for native and non-native speakers
Univ-Connecticut-ChatGPT-Presentaion.pdf
A comparative study of natural language inference in Swahili using monolingua...
Hybrid model detection and classification of lung cancer

Clipping2

  • 1. Polygon Clipping When a closed polygon is clipped as a collection of lines, the original closed polygon becomes one or more open polygons or discrete lines . For polygon clipping we require an algorithm that will generate one or more closed areas. The output of a polygon clippers be a sequence of vertices that defines the clipped polygon boundary.
  • 2. Sutherland Hodgeman Algorithm We can correctly clip a polygon by processing a polygon boundary as a whole against each window edge. This could be accomplished by processing all polygon vertices against each clip rectangle boundary. Beginning with the initial set of polygon vertices, we could first clip against the left rectangle boundary to procedure a new sequence of vertices.
  • 3. Sutherland Hodgeman Algorithm The new set of vertices could than be successively passed to a right boundary clipper, a bottom boundary clipper, & a top boundary clipper. At each step a new sequence of output vertices is generated & passed to the next window boundary clipper. These are four possible cases when processing vertices in sequence around the perimeter of a polygon.
  • 4. Sutherland Hodgeman Algorithm Left Clipper Right Clipper Bottom Clipper Top Clipper
  • 5. Sutherland Hodgeman Algorithm As each pair of adjacent polygon vertices is passed to a window boundary clipper we make the following tests. * If the first vertex is outside the window boundary & the second vertex is inside, the intersection point of the polygon edge with the window boundary & the second vertex are added to the output vertex list. V1 V2 V1’ Out – In Save V1’, V2
  • 6. Sutherland Hodgeman Algorithm * If both input vertices are inside the window boundary only the second vertex is added to the output vertex list. V1 V2 In – Out Save V2
  • 7. Sutherland Hodgeman Algorithm * If the vertex is inside the window boundary & the second vertex is outside; only the edge intersection with the window boundary is added to the output vertex list V1 V2 In – Out Save V2’ V2’
  • 8. Sutherland Hodgeman Algorithm * If both input vertices are outside the window boundary, nothing is added to the output list. V1 V2 Save None
  • 9. Sutherland Hodgeman Algorithm Left Edge List a’bcdefghii’ Right Edge List bcdd’e’fghii’a’ Bottom Edge List cdd’e’ff’h’ii’a’b Top Edge List c’dd’e’ff’h’ii’a’bb’ a a’ b b’ c c’ d d’ e e’ f f’ g h h’ i i’
  • 10. Sutherland Hodgeman Algorithm Convex polygon are correctly clipped by the Sutherland-Hodgeman algorithm but concave polygon may be displayed with extraneous lines. This is occur when the clipped polygon should have two or more separate section. Since there is only one output vertex list, the last vertex in the list is always joined to the first vertex list
  • 11. Weiler-Atherlton Polygon Clipping In this method, vertex processing procedures for window boundaries are modified so that concave polygons are displayed correctly. This clipping procedure was developed as a method for identifying visible surfaces, & so it can be applied with arbitrary polygon clipping regions. The basic idea in this algorithm is that instead of always processing around the polygon edges as vertices are processed, we some times want to follow the window boundaries.
  • 12. Weiler-Atherlton Polygon Clipping Which path we follow depends on the polygon processing directions (clockwise or counter clockwise) & whether the pair of polygon vertices currently being processed represented an outside to inside pair or an inside to outside pair. For an outside to inside pair of vertices, follow the polygon boundary. For an inside to outside pair of vertices, follow the window boundary in a clockwise direction.
  • 13. Weiler-Atherlton Polygon Clipping Concave Polygon V1 V1’ V2 V3 V3’ V4 V4’ V5 V5’ V6
  • 14. Weiler-Atherlton Polygon Clipping c1 c2 c3 c4 s1 s2 s3 s4 s5 s6 s7 I1 I2 I3 I4 I5 I6 I7 I8 Subject Polygon Clip Polygon
  • 15. Weiler-Atherlton Polygon Clipping Subject Polygon List Clip Polygon List s1 c1 I2 I1 I3 I2 s2 c2 I4 I3 s3 I4 I5 c3 s4 I5 I6 I6 I7 c4 s5 I7 I8 I8 s6 c1 I1 s7 s1