0% found this document useful (0 votes)
83 views3 pages

CG Module2 PDF

The document discusses fill area primitives in computer graphics. It defines fill areas as shapes that are filled with a solid color or pattern. While arbitrary shapes can be used, graphics libraries typically only support polygons. Polygons are plane shapes defined by three or more connected vertices. The document discusses different types of polygons including convex and concave, and notes that concave polygons need to be split into convex polygons for efficient processing by graphics routines. It also outlines some common polygon fill algorithms used in computer graphics.

Uploaded by

sangamesh k
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
83 views3 pages

CG Module2 PDF

The document discusses fill area primitives in computer graphics. It defines fill areas as shapes that are filled with a solid color or pattern. While arbitrary shapes can be used, graphics libraries typically only support polygons. Polygons are plane shapes defined by three or more connected vertices. The document discusses different types of polygons including convex and concave, and notes that concave polygons need to be split into convex polygons for efficient processing by graphics routines. It also outlines some common polygon fill algorithms used in computer graphics.

Uploaded by

sangamesh k
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Module 2 Fill Area Primitives

2.1 Fill area Primitives:


2.1.1 Introduction
2.1.2 Polygon fill-areas,
2.1.3 OpenGL polygon Fill Area Functions,
2.1.4 Fill area attributes,
2.1.5 General scan line polygon fill algorithm,
2.1.6 OpenGL fill-area Attribute functions.

2.1.1 Introduction
 An useful construct for describing components of a picture is an area that is filled with
some solid color or pattern.
 A picture component of this type is typically referred to as a fill area or a filled area.
 Any fill-area shape is possible, graphics libraries generally do not support specifications
for arbitrary fill shapes
 Figure below illustrates a few possible fill-area shapes.

 Graphics routines can more efficiently process polygons than other kinds of fill shapes
because polygon boundaries are described with linear equations.
 When lighting effects and surface-shading procedures are applied, an approximated
curved surface can be displayed quite realistically.
 Approximating a curved surface with polygon facets is sometimes referred to as surface
tessellation, or fitting the surface with a polygon mesh.

1
Module 2 Fill Area Primitives

 Below figure shows the side and top surfaces of a metal cylinder approximated in an
outline form as a polygon mesh.

 Displays of such figures can be generated quickly as wire-frame views, showing only the
polygon edges to give a general indication of the surface structure
 Objects described with a set of polygon surface patches are usually referred to as standard
graphics objects, or just graphics objects.

2.1.2 Polygon Fill Areas


 A polygon is a plane figure specified by a set of three or more coordinate positions,
called vertices, that are connected in sequence by straight-line segments, called the edges
or sides of the polygon.
 It is required that the polygon edges have no common point other than their endpoints.
 Thus, by definition, a polygon must have all its vertices within a single plane and there
can be no edge crossings
 Examples of polygons include triangles, rectangles, octagons, and decagons
 Any plane figure with a closed-polyline boundary is alluded to as a polygon, and one
with no crossing edges is referred to as a standard polygon or a simple polygon
Problem:
 For a computer-graphics application, it is possible that a designated set of polygon
vertices do not all lie exactly in one plane
 This is due to roundoff error in the calculation of numerical values, to errors in selecting
coordinate positions for the vertices, or, more typically, to approximating a curved
surface with a set of polygonal patches
Solution:
 To divide the specified surface mesh into triangles

2
Module 2 Fill Area Primitives

Polygon Classifications
 Polygons are classified into two types
1. Convex Polygon and
2. Concave Polygon
Convex Polygon:
 The polygon is convex if all interior angles of a polygon are less than or equal to 180◦,
where an interior angle of a polygon is an angle inside the polygon boundary that is
formed by two adjacent edges
 An equivalent definition of a convex polygon is that its interior lies completely on one
side of the infinite extension line of any one of its edges.
 Also, if we select any two points in the interior of a convex polygon, the line segment
joining the two points is also in the interior.
Concave Polygon:
 A polygon that is not convex is called a concave polygon.
Te below figure shows convex and concave polygon

 The term degenerate polygon is often used to describe a set of vertices that are collinear
or that have repeated coordinate positions.

Problems in concave polygon:



Implementations of fill algorithms and other graphics routines are more complicated
Solution:

It is generally more efficient to split a concave polygon into a set of convex polygons
before processing

You might also like