View by Category

The presentation will start after a short

(15 second) video ad from one of our sponsors.

Hot tip: Video ads won’t appear to registered users who are logged in. And it’s free to register and free to log in!

(15 second) video ad from one of our sponsors.

Hot tip: Video ads won’t appear to registered users who are logged in. And it’s free to register and free to log in!

Loading...

PPT – Introduction to Polygons PowerPoint presentation | free to view - id: 87720-NTJhN

The Adobe Flash plugin is needed to view this content

About This Presentation

Write a Comment

User Comments (0)

Transcript and Presenter's Notes

Introduction to Polygons

- Different types of Polygons
- Simple Convex
- Simple Concave
- Non-simple self-intersecting
- With holes

Convex

Concave

Self-intersecting

Introduction to Polygons

- Convex
- A region S is convex iff for any x1 and x2

in S, the straight line segment connecting x1 and

x2 is also contained in S. The convex hull of an

object S is the smallest H such that S

Scan Line Polygon Fill Algorithms

- A standard output primitive in general graphics

package is a solid color or patterned polygon

area - There are two basic approaches to filling on

raster systems. - Determine overlap Intervals for scan lines that

cross that area. - Start from a given interior point and paint

outward from this point until we encounter the

boundary - The first approach is mostly used in general

graphics packages, however second approach is

used in applications having complex boundaries

and interactive painting systems

Xk1,yk1

Scan Line yk 1

Scan Line yk

Xk , yk

Seed Fill Algorithm

- These algorithms assume that at least one pixel

interior to a polygon or region is known - Regions maybe interior or boundary defined

Interior-defined region

Interior-defined region

A Simple Seed Fill Algorithm

- Push the seed pixel onto the stack
- While the stack is not empty
- Pop a pixel from the stack
- Set the pixel to the required value
- For each of the 4 connected pixels
- Adjacent to the current pixel, check if it

is a boundary pixel or if it has already been set

to the required value. - In either case ignore it. Otherwise push it

onto the stack - The algorithm can be implemented using 8

connected pixels - It also works with holes in the polygons

Scan Line Polygon Fill Algorithm

10 14 18 24

Interior pixels along a scan line passing through

a polygon area

- For each scan line crossing a polygon are then

sorted from left to right, and

the corresponding frame buffer positions between

each intersection pair are set to the specified

color. - These intersection points are then sorted from

left to right , and the corresponding frame

buffer positions between each intersection pair

are set to specified color

Scan Line Polygon Fill Algorithm

- In the given example ( previous slide) , four

pixel intersections define stretches from x10 to

x14 and x18 to x24 - Some scan-Line intersections at polygon vertices

require special handling - A scan Line passing through a vertex intersects

two polygon edges at that position, adding two

points to the list of intersections for the scan

Line - In the given example , scan Line y intersects

five polygon edges and the scan Line y

intersects 4 edges although it also passes

through a vertex - y correctly identifies internal pixel spans ,but

need some extra processing

Scan line Polygon Fill Algorithm

- One way to resolve this is also to shorten some

polygon edges to split those vertices that should

be counted as one intersection - When the end point y coordinates of the two edges

are increasing , the y value of the upper

endpoint for the current edge is decreased by 1 - When the endpoint y values are monotonically

decreasing, we decrease the y coordinate of the

upper endpoint of the edge following the current

edge

Scan Line Polygon Fill Algorithm

(a)

(b)

Adjusting endpoint values for a polygon, as we

process edges in order around the polygon

perimeter. The edge currently being processed is

indicated as a solid like. In (a), the y

coordinate of the upper endpoint of the current

edge id decreased by 1. In (b), the y coordinate

of the upper end point of the next edge is

decreased by 1

Scan Line Polygon Fill Algorithm

- The topological difference between scan Line y

and scan Line y'

- The topological difference between scan line y

and scan line y is - For Scan line y, the two intersecting edges

sharing a vertex are on opposite sides of the

scan line ! - But for scan line y, the two intersecting

edges are both above the scan line - Thu, the vertices that require additional

processing are those that have connecting edges

on opposite sides of scan line. - We can identify these vertices by tracing around

the polygon boundary either in clock-wise or

anti-clockwise order and observing the relative

changes in vertex y coordinates as we move from

one edge to the next. - If the endpoint y values of two consecutive

edges monotonically increase or decrease, we need

to count the middle vertex as a single

intersection point for any scan line passing

through that vertex.

- Otherwise, the shared vertex represents a local

extremum (min. or max.) on the polygon boundary,

and the two edge intersections with the scan line

passing through that vertex can be added to the

intersection list

Figure 3-36 Intersection points along the scan

lines that intersect polygon vertices. Scan line

y generates an odd number of intersections, but

scan line y generates an even number of

intersections that can be paired to identify

correctly the interior pixel spans.

- The scan conversion algorithm works as follows
- Intersect each scanline with all edges
- Sort intersections in x
- Calculate parity of intersections to determine

in/out - Fill the in pixels
- Special cases to be handled
- Horizontal edges should be excluded
- For vertices lying on scanlines,
- count twice for a change in slope.
- Shorten edge by one scanline for no change in

slope - Coherence between scanlines tells us that
- Edges that intersect scanline y are likely to

intersect y 1 - X changes predictably from scanline y to y 1

- We have 2 data structures Edge Table and Active

Edge Table - Traverse Edges to construct an Edge Table
- Eliminate horizontal edges
- Add edge to linked-list for the scan line

corresponding to the lower vertex. - Store the following
- y_upper last scanline to consider
- x_lower starting x coordinate for edge
- 1/m for incrementing x compute
- Construct Active Edge Table during scan

conversion. AEL is a linked list of active edges

on the current scanline, y. Each active edge line

has the following information - y_upper last scanline to consider
- x_lower edges intersection with current y
- 1/m x increment
- The active edges are kept sorted by x

- Algorithm
- Set y to the smallest y coordinate that has an

entry in the ET i.e, y for the first nonempty

bucket. - Initialize the AET to be empty.
- Repeat until the AET and ET are empty
- 3.1 Move from ET bucket y to the AET those edges

whose y_min y (entering edges). - 3.2 Remove from the AET those entries for which y

y_max (edges not involved in the next

scanline), the sort the AET on x (made easier

because ET is presorted). - 3.3 Fill in desired pixel values on scanline y by

using pairs of x coordinates from AET. - 3.4 Increment y by 1 (to the coordinate of the

next scanline). - 3.5 For each nonvertical edge remaining in the

AET, update x for the new y. - Extensions
- Multiple overlapping polygons priorities
- Color, patterns Z for visibility

(No Transcript)

About PowerShow.com

PowerShow.com is a leading presentation/slideshow sharing website. Whether your application is business, how-to, education, medicine, school, church, sales, marketing, online training or just for fun, PowerShow.com is a great resource. And, best of all, most of its cool features are free and easy to use.

You can use PowerShow.com to find and download example online PowerPoint ppt presentations on just about any topic you can imagine so you can learn how to improve your own slides and presentations for free. Or use it to find and download high-quality how-to PowerPoint ppt presentations with illustrated or animated slides that will teach you how to do something new, also for free. Or use it to upload your own PowerPoint slides so you can share them with your teachers, class, students, bosses, employees, customers, potential investors or the world. Or use it to create really cool photo slideshows - with 2D and 3D transitions, animation, and your choice of music - that you can share with your Facebook friends or Google+ circles. That's all free as well!

For a small fee you can get the industry's best online privacy or publicly promote your presentations and slide shows with top rankings. But aside from that it's free. We'll even convert your presentations and slide shows into the universal Flash format with all their original multimedia glory, including animation, 2D and 3D transition effects, embedded music or other audio, or even video embedded in slides. All for free. Most of the presentations and slideshows on PowerShow.com are free to view, many are even free to download. (You can choose whether to allow people to download your original PowerPoint presentations and photo slideshows for a fee or free or not at all.) Check out PowerShow.com today - for FREE. There is truly something for everyone!

You can use PowerShow.com to find and download example online PowerPoint ppt presentations on just about any topic you can imagine so you can learn how to improve your own slides and presentations for free. Or use it to find and download high-quality how-to PowerPoint ppt presentations with illustrated or animated slides that will teach you how to do something new, also for free. Or use it to upload your own PowerPoint slides so you can share them with your teachers, class, students, bosses, employees, customers, potential investors or the world. Or use it to create really cool photo slideshows - with 2D and 3D transitions, animation, and your choice of music - that you can share with your Facebook friends or Google+ circles. That's all free as well!

For a small fee you can get the industry's best online privacy or publicly promote your presentations and slide shows with top rankings. But aside from that it's free. We'll even convert your presentations and slide shows into the universal Flash format with all their original multimedia glory, including animation, 2D and 3D transition effects, embedded music or other audio, or even video embedded in slides. All for free. Most of the presentations and slideshows on PowerShow.com are free to view, many are even free to download. (You can choose whether to allow people to download your original PowerPoint presentations and photo slideshows for a fee or free or not at all.) Check out PowerShow.com today - for FREE. There is truly something for everyone!

presentations for free. Or use it to find and download high-quality how-to PowerPoint ppt presentations with illustrated or animated slides that will teach you how to do something new, also for free. Or use it to upload your own PowerPoint slides so you can share them with your teachers, class, students, bosses, employees, customers, potential investors or the world. Or use it to create really cool photo slideshows - with 2D and 3D transitions, animation, and your choice of music - that you can share with your Facebook friends or Google+ circles. That's all free as well!

For a small fee you can get the industry's best online privacy or publicly promote your presentations and slide shows with top rankings. But aside from that it's free. We'll even convert your presentations and slide shows into the universal Flash format with all their original multimedia glory, including animation, 2D and 3D transition effects, embedded music or other audio, or even video embedded in slides. All for free. Most of the presentations and slideshows on PowerShow.com are free to view, many are even free to download. (You can choose whether to allow people to download your original PowerPoint presentations and photo slideshows for a fee or free or not at all.) Check out PowerShow.com today - for FREE. There is truly something for everyone!

For a small fee you can get the industry's best online privacy or publicly promote your presentations and slide shows with top rankings. But aside from that it's free. We'll even convert your presentations and slide shows into the universal Flash format with all their original multimedia glory, including animation, 2D and 3D transition effects, embedded music or other audio, or even video embedded in slides. All for free. Most of the presentations and slideshows on PowerShow.com are free to view, many are even free to download. (You can choose whether to allow people to download your original PowerPoint presentations and photo slideshows for a fee or free or not at all.) Check out PowerShow.com today - for FREE. There is truly something for everyone!

Recommended

«

/ »

Page of

«

/ »

Promoted Presentations

Related Presentations

Page of

Page of

CrystalGraphics Sales Tel: (800) 394-0700 x 1 or Send an email

Home About Us Terms and Conditions Privacy Policy Contact Us Send Us Feedback

Copyright 2015 CrystalGraphics, Inc. — All rights Reserved. PowerShow.com is a trademark of CrystalGraphics, Inc.

Copyright 2015 CrystalGraphics, Inc. — All rights Reserved. PowerShow.com is a trademark of CrystalGraphics, Inc.

The PowerPoint PPT presentation: "Introduction to Polygons" is the property of its rightful owner.

Do you have PowerPoint slides to share? If so, share your PPT presentation slides online with PowerShow.com. It's FREE!

Committed to assisting Udel University and other schools with their online training by sharing educational presentations for free