cittadelmonte.info Art Pdf For Computer Graphics

# PDF FOR COMPUTER GRAPHICS

Tuesday, January 8, 2019

Welcome to CM — Fundamentals of Computer Graphics. All Computer Graphics demands a working knowledge of linear algebra (matrix manipula-. fabio pellacini • 6 problems in graphics. • 3D rendering. – visibility estimation. – lighting simulation. – materials simulation. [Cornell PCG]. [Cornell PCG]. Graphics. 2. Computer-Aided Design. Presentation Graphics. 'I Computer Art l 3 Entertainment. Education and Training. 2 1. Visualization.

 Author: LUCILA DOWLAND Language: English, Spanish, Arabic Country: Eritrea Genre: Biography Pages: 372 Published (Last): 10.01.2016 ISBN: 516-9-58554-317-8 ePub File Size: 18.86 MB PDF File Size: 19.67 MB Distribution: Free* [*Regsitration Required] Downloads: 33630 Uploaded by: LOTTIE

Introduction to Computer Graphics. Version , January David J. Eck. Hobart and William Smith Colleges. This is a PDF version of a free on-line book that. Computer Graphics i. About the Tutorial. To display a picture of any size on a computer screen is a difficult process. Computer graphics are used to simplify this . Torsten Möller. Introduction to. Computer Graphics. Torsten Möller. TASC [email protected] cittadelmonte.info~torsten.

For filling polygons with particular colors, you need to determine the pixels falling on the border of the polygon and those which fall inside the polygon. In this chapter, we will see how we can fill polygons using different techniques. A Polygon Scan Line Algorithm This algorithm works by intersecting scanline with polygon edges and fills the polygon between pairs of intersections.

The following steps depict how this algorithm works. Find out the Ymin and Ymax from the given polygon. ScanLine Step 2: ScanLine intersects with each edge of the polygon from Ymin to Ymax.

Name each intersection point of the polygon. As per the figure shown above, they are named as p0, p1, p2, p3. Sort the intersection point in the increasing order of X coordinate i. Fill all those pair of coordinates that are inside polygons and ignore the alternate pairs.

Flood Fill Algorithm Sometimes we come across an object where we want to fill the area and its boundary with different colors. We can paint such objects with a specified interior color instead of searching for particular boundary color as in boundary filling algorithm.

Instead of relying on the boundary of the object, it relies on the fill color. In other words, it replaces the interior color of the object with the fill color. When no more pixels of the original interior color exist, the algorithm is completed. Once again, this algorithm relies on the Four-connect or Eight-connect method of filling in the pixels.

But instead of looking for the boundary color, it is looking for all adjacent pixels that are a part of the interior. This algorithm picks a point inside an object and starts to fill until it hits the boundary of the object.

The color of the boundary and the color that we fill should be different for this algorithm to work. In this algorithm, we assume that color of the boundary is same for the entire object. The boundary fill algorithm can be implemented by 4-connetected pixels or 8- connected pixels. We are putting the pixels above, below, to the right, and to the left side of the current pixels and this process will continue until we find a boundary with different color.

Initialize the value of seed point seedx, seedy , fcolor and dcol. Define the boundary values of the polygon. Check if the current seed point is of default color, then repeat the steps 4 and 5 till the boundary pixels reached. Change the default color with the fill color at the seed point.

Recursively follow the procedure with four neighborhood points. Exit There is a problem with this technique. Consider the case as shown below where we tried to fill the entire region.

Here, the image is filled only partially. In such cases, 4- connected pixels technique cannot be used. We are putting pixels above, below, right and left side of the current pixels as we were doing in 4- connected technique.

In addition to this, we are also putting pixels in diagonals so that entire area of the current pixel is covered. This process will continue until we find a boundary with different color. Recursively follow the procedure with four neighbourhood points. Inside-outside Test This method is also known as counting number method. While filling an object, we often need to identify whether particular point is inside the object or outside it. There are two methods by which we can identify whether particular point is inside an object or outside.

If the number of interactions is odd, then the point x,y is an interior point; and if the number of interactions is even, then the point x,y is an exterior point.

The following example depicts this concept. From both ends, the number of interaction points is odd, so the point is considered within the object. Nonzero Winding Number Rule This method is also used with the simple polygons to test the given point is interior or not.

It can be simply understood with the help of a pin and a rubber band. Fix up the pin on one of the edge of the polygon and tie-up the rubber band in it and then stretch the rubber band along the edges of the polygon.

When all the edges of the polygon are covered by the rubber band, check out the pin which has been fixed up at the point to be test. If we find at least one wind at the point consider it within the polygon, else we can say that the point is not inside the polygon. In another alternative method, give directions to all the edges of the polygon.

Draw a scan line from the point to be test towards the left most of X direction. So the point is said to be an interior point. The viewing transformation is insensitive to the position of points relative to the viewing volume — especially those points behind the viewer — and it is necessary to remove these points before generating the view. Point Clipping Clipping a point from a given window is very easy.

Consider the following figure, where the rectangle indicates the window. Point clipping tells us whether the given point X, Y is within the given window or not; and decides whether we will use the minimum and maximum coordinates of the window. Line Clipping The concept of line clipping is same as point clipping. In line clipping, we will cut the portion of line which is outside of window and keep only the portion that is inside the window.

We will use 4-bits to divide the entire region. These 4 bits represent the Top, Bottom, Right, and Left of the region as shown in the following figure. Line can be completely inside the window This line will be completely removed from the region. Line can be completely outside of the window This line will be completely removed from the region. Line can be partially inside the window We will find intersection point and draw only that portion of line that is inside region.

Assign a region code for each endpoints. If both endpoints have a region code then accept this line. Else, perform the logical AND operation for both region codes. Step 3. If the result is not , then reject the line. Else you need clipping. Choose an endpoint of the line that is outside the window.

Find the intersection point at the window boundary base on region code. Replace endpoint with the intersection point and update the region code. Repeat step 2 until we find a clipped line either trivially accepted or trivially rejected. Repeat step 1 for other lines. It employs parametric line representation and simple dot products. Parametric equation of line is: Sutherland Hodgeman polygon clipping algorithm is used for polygon clipping.

In this algorithm, all the vertices of the polygon are clipped against each edge of the clipping window. First the polygon is clipped against the left edge of the polygon window to get new vertices of the polygon. These new vertices are used to clip the polygon against right edge, top edge, bottom edge, of the clipping window as shown in the following figure. Polygon before Filling While processing an edge of a polygon with clipping window, an intersection point is found if edge is not completely inside clipping window and the a partial edge from the intersection point to the outside edge is clipped.

The following figures show left, right, top and bottom edge clippings: Clipping Left Edge Figure: Clipping Right Edge Figure: Clipping Top Edge Figure: Clipping Bottom Edge Text Clipping Various techniques are used to provide text clipping in a computer graphics. It depends on the methods used to generate characters and the requirements of a particular application.

There are three methods for text clipping which are listed below: All or none string clipping 2. All or none character clipping 3. In all or none string clipping method, either we keep the entire string or we reject entire string based on the clipping window. The following figure shows all or none character clipping: This clipping method is based on characters rather than entire string.

In this method if the string is entirely inside the clipping window, then we keep it. If it is partially outside the window, then: This clipping method is based on characters rather than the entire string.

Bitmap Graphics A bitmap is a collection of pixels that describes an image. It is a type of computer graphics that the computer uses to store and display pictures. In this type of graphics, images are stored bit by bit and hence it is named Bit-map graphics. For better understanding let us consider the following example where we draw a smiley face using bit-map graphics. Bitmap storage of smiley face By observing the original smiley face closely, we can see that there are two blue lines which are represented as B1, B2 and E1, E2 in the above figure.

The main disadvantages of bitmap graphics are: If you try to resize, the pixels get blurred. We can have various types of transformations such as translation, scaling up or down, rotation, shearing, etc.

When a transformation takes place on a 2D plane, it is called 2D transformation. Transformations play an important role in computer graphics to reposition the graphics on the screen and change their size or orientation. Homogenous Coordinates To perform a sequence of transformation such as translation followed by rotation and scaling, we need to follow a sequential process: Translate the coordinates, 2. Rotate the translated coordinates, and then 3.

Scale the rotated coordinates to complete the composite transformation.

In this way, we can represent the point by 3 numbers instead of 2 numbers, which is called Homogenous Coordinate system. In this system, we can represent all the transformation equations in matrix multiplication.

Translation A translation moves an object to a different position on the screen. The above equations can also be represented using the column vectors. However, for negative angle rotation, the matrix will change as shown below: In the scaling process, you either expand or compress the dimensions of the object.

Scaling can be achieved by multiplying the original coordinates of the object with the scaling factor to get the desired result.

This can be mathematically represented as shown below: The above equations can also be represented in matrix form as below: The scaling process is shown in the following figure. After Scaling Process If we provide values less than 1 to the scaling factor S, then we can reduce the size of the object. If we provide values greater than 1, then we can increase the size of the object.

Reflection Reflection is the mirror image of original object. In reflection transformation, the size of the object does not change.

The following figures show reflections with respect to X and Y axes, and about the origin respectively. There are two shear transformations X-Shear and Y-Shear. One shifts X coordinates values and other shifts Y coordinate values.

However, in both the cases, only one coordinate changes its coordinates and other preserves its values. Shearing is also termed as Skewing. X-Shear The X-Shear preserves the Y coordinate and changes are made to X coordinates, which causes the vertical lines to tilt right or left as shown in below figure. The Y-Shear can be represented in matrix from as: Composite transformation can be achieved by concatenation of transformation matrices to obtain a combined transformation matrix.

The basic purpose of composing transformations is to gain efficiency by applying a single composed transformation to a point, rather than applying a series of transformation, one after another. For example, to rotate an object about an arbitrary point Xp, Yp , we have to carry out three steps: Translate point Xp, Yp to the origin. Rotate it about the origin. Finally, translate the center of rotation back where it belonged.

It is a continuing area of research in scientific visualization. Furthermore, 3D graphics components are now a part of almost every personal computer and, although traditionally intended for graphics-intensive software such as games, they are increasingly being used by other applications. Parallel Projection Parallel projection discards z-coordinate and parallel lines from each vertex on the object are extended until they intersect the view plane.

In parallel projection, we specify a direction of projection instead of center of projection. In parallel projection, the distance from the center of projection to project plane is infinite. In this type of projection, we connect the projected vertices by line segments which correspond to connections on the original object. Parallel projections are less realistic, but they are good for exact measurements. In this type of projections, parallel lines remain parallel and angles are not preserved.

Various types of parallel projections are shown in the following hierarchy. Types of Parallel Projection Orthographic Projection In orthographic projection the direction of projection is normal to the projection of the plane.

There are three types of orthographic projections: In oblique projection, we can view the object better than orthographic projection. There are two types of oblique projections: Cavalier and Cabinet.

The projection of a line perpendicular to the view plane has the same length as the line itself in Cavalier projection. In a cavalier projection, the foreshortening factors for all three principal directions are equal. The Cabinet projection makes Both the projections are shown in the following figure: The most common axonometric projection is an isometric projection where the projection plane intersects each coordinate axis in the model coordinate system at an equal distance.

In this projection parallelism of lines are preserved but angles are not preserved. The following figure shows isometric projection: Isometric Projection Perspective Projection In perspective projection, the distance from the center of projection to project plane is finite and the size of the object varies inversely with distance which looks more realistic.

The distance and angles are not preserved and parallel lines do not remain parallel. Instead, they all converge at a single point called center of projection or projection reference point. There are 3 types of perspective projections which are shown in the following chart.

Types of Perspective Projections The following figure shows all the three types of perspective projection: The process for translation in 3D is similar to 2D translation. A translation moves an object into a different position on the screen. In 3D rotation, we have to specify the angle of rotation along with the axis of rotation. We can perform 3D rotation about X, Y, and Z axes. They are represented in the matrix form as below: Rotation about x-axis Rotation about y-axis Rotation about z-axis Figure: The following figure shows the effect of 3D scaling: A matrix with n x m dimensions is multiplied with the coordinate of objects.

Usually 3 x 3 or 4 x 4 matrices are used for transformation. For example, consider the following matrix for various operation. Objects are not flat all the time and we need to draw curves many times to draw an object. Types of Curves A curve is an infinitely large set of points. Each point has two neighbors except endpoints.

Curves can be broadly classified into three categories: Implicit Curves Implicit curve representations define the set of points on a curve by employing a procedure that can test to see if a point in on the curve. Usually, an implicit curve is defined by an implicit function of the form: Such a function is the explicit representation of the curve. The explicit representation is not general, since it cannot represent vertical lines and is also single-valued.

For each value of x, only a single value of y is normally computed by the function. Parametric Curves Curves having parametric form are called parametric curves.

The explicit and implicit curve representations can be used only when the function is known. In practice the parametric curves are used. A two-dimensional parametric curve has the following form: These curves can be generated under the control of other points. Approximate tangents by using control points are used to generate curve. The Bezier curve can be represented mathematically as: A quadratic Bezier curve is determined by three control points.

A cubic Bezier curve is determined by four control points. Properties of Bezier Curves Bezier curves have the following properties: Therefore, for 4 control points, the degree of the polynomial is 3, i. The B-spline basis contains the Bernstein basis as the special case. The B-spline basis is non-global. It describes a 3D object as a set of surfaces that separates the object interior from the environment.

It is used to describe interior properties, by partitioning the spatial region containing an object into a set of small, non-overlapping, contiguous solids usually cubes.

The most commonly used boundary representation for a 3D graphics object is a set of surface polygons that enclose the object interior. Many graphics system use this method. Set of polygons are stored for object description.

This simplifies and speeds up the surface rendering and display of object since all surfaces can be described with linear equations. The polygon surfaces are common in design and solid-modeling applications, since their wireframe display can be done quickly to give general indication of surface structure. Then realistic scenes are produced by interpolating shading patterns across polygon surface to illuminate. Polygon Tables In this method, the surface is specified by the set of vertex coordinates and associated attributes.

As shown in the following figure, there are five vertices, from v1 to v5. In the following figure, edge E1 lies between vertex v1 and v2 which is represented in the table as E1: From the following figure, surface S1 is covered by edges E1, E2 and E3 which can be represented in the polygon surface table as S1: E1, E2, and E3. We can obtain the values of A, B, C, and D by solving a set of three plane equations using the coordinate values for three non collinear points in the plane.

Let us assume that three vertices of the plane are x1, y1, z1 , x2, y2, z2 and x3, y3, z3. You get the values of A, B, C, and D. Polygon Meshes 3D surfaces and solids can be approximated by a set of polygonal and line elements.

Such surfaces are called polygonal meshes.

In polygon mesh, each edge is shared by at most two polygons. A polygonal mesh can be rendered using hidden surface removal algorithms.

## Computer Graphics Books

The polygon mesh can be represented by three ways: We must remove these hidden surfaces to get a realistic screen image. The identification and removal of these surfaces is called Hidden-surface problem. There are two approaches for removing hidden surface problems: Object-Space method and Image-space method.

The Object-space method is implemented in physical coordinate system and image-space method is implemented in screen coordinate system. When we want to display a 3D object on a 2D screen, we need to identify those parts of a screen that are visible from a chosen viewing position.

It is an image-space approach. The basic idea is to test the Z-depth of each surface to determine the closest visible surface. Phillips and Bonnie L. Webber PDF Pages English This book is intended for human factors engineers requiring current knowledge of how a computer graphics surrogate human can augment their analyses of designed environments.

It will also help inform design engineers of the state-of-the-art in human gure modeling, and hence of the human-centered design central to the emergent notion of Concurrent Engineering. Free Computer Graphics Books.

Artificial Intelligence. Compiler Design. Computation Theory. Computer Algorithm. Computer Architecture. Computer Graphics. Functional Programming. Information Theory. Numerical Computation. Operating System. Programming Theory. About Us. Link to us.

Contact Us. Post Queries. This section contains free e-books and guides on Computer Graphics, some of the resources in this section can be viewed online and some of them can be downloaded. Computer Graphics Books.

Computes First Book of Atari Graphics. Computer Graphics Primer. Encyclopedia of Graphics File Formats. Graph Theory, 3rd Edition R.

HERLINDA from North Dakota
Also read my other articles. I have only one hobby: racewalking. I am fond of studying docunments jubilantly.