Area Clipping or Polygon Clipping - PowerPoint PPT Presentation

About This Presentation
Title:

Area Clipping or Polygon Clipping

Description:

Area Clipping or Polygon Clipping Modify line clipping procedures. After applying line clipper the polygon is displayed as a series of unconnected line segments. – PowerPoint PPT presentation

Number of Views:247
Avg rating:3.0/5.0
Slides: 14
Provided by: nscnetwor
Category:

less

Transcript and Presenter's Notes

Title: Area Clipping or Polygon Clipping


1
Area Clipping or Polygon Clipping
2
(No Transcript)
3
(No Transcript)
4
(No Transcript)
5
Sutherland Hodgeman Method
  • Clip the polygon by processing the polygon
    boundary as a whole against each window.
  • Process all polygon vertices against each clip
    rectangle boundary in turn.
  • First clip the polygon against the left boundary
    to produce a new sequence of vertices.
  • The new sequence of vertices is then successive
    passed to right, bottom and top boundary clipper.
  • At each step a new sequence of output vertices is
    generated and passed to the next boundary clipper

6
(No Transcript)
7
Sutherland-HodgmanPolygon Clipping
  • Input each edge (vertex pair) successively.
  • Output is a new list of vertices.
  • 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 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.
  • The last vertex in the list is always added to
    the first vertex

8
Sutherland-Hodgeman Polygon Clipping Four
possible scenarios at each clipper
outside inside
outside inside
outside inside
outside inside
v2
v2
v2
v2
v1
v1
v1
v1
v1
v1
Outside to inside Output v1 and v2
Inside to inside Output v2
Inside to outside Output v1
Outside to outside Output nothing
9
  • The last vertex in the list is always added to
    the first vertex

10
Sutherland-Hodgeman Polygon Clipping
v2
Figure 6-27, page 332
v2
v3
v1
v3
Right Clipper
Bottom Clipper
Top Clipper
Left Clipper
v1
v2
v2v3
v2v1
v1
v2v2
v2
v2
v1v2
v2
v2v3
v3
v3v1
v1v2
v2
v2v3
v2
v3v1
v3v1
v1
v1v2
v1v2
v2v2
v3v1
v2
v1v2
v2
v2v2
v2
v2v2
Edges Output
Edges Output
Edges Output
Edges Output
Final
11
(No Transcript)
12
(No Transcript)
13
(No Transcript)
Write a Comment
User Comments (0)
About PowerShow.com