Introduction to Computer Graphics

Size: px
Start display at page:

Download "Introduction to Computer Graphics"

Transcription

1 Introduction to Computer Graphics Introduction to Computer Graphics The computer is an information processing machine. It is a tool for storing, manipulating and correcting data. There are many ways to communicate the processed information to the user. The computer graphics is one of the most effective and common way to communicate the processes information to the users. It displays the information in the form of graphics objects. Such as pictures, diagrams, and graphs instead of simple text. That means with the help of computer graphics, we can express the data in pictorial form. In CG, pictures and graphics objects are presented as a collection of picture elements called pixel. The pixel is the smallest addressable screen element. It is the smallest piece of the display screen which we can control. The control is achieved by setting the intensity and color of the pixel, which compose the screen. Computer Graphics Computer Graphics is a process of generation of images of virtual scenes using computer hardware. It is a human oriented system that uses the capability of a computer to create, transform and display pictorial and symbolic data. Application of Computer Graphics Presentation Graphics Presentation graphics is used to produce illustrations for reports or to generate 35-mm slides or transparencies for use with projectors. Presentation graphics is commonly used to summarize financial, statistical, mathematical, scientific, and economic data for research reports, managerial reports, consumer information bulletins, and other types of reports. Workstation devices and service bureaus exist for converting screen displays into 35-mm slides or overhead transparencies for use in presentations. Typical examples of presentation graphics are bar charts, line graphs, surface graphs, pie charts, and other displays showing relationships between multiple parameters. Entertainment For many entertainment applications, photo realistic techniques are used to render images of a product. Animations are used frequently in advertising and TV commercials are produced frame by frame where each frame of a motion is rendered and saved in an image file. In each successive frame, the motion is simulated by moving object position slightly from the positions in the previous frame. When all frames in animation sequence have been rendered, the frames are transferred to film or stored in a video buffer for playback. Film animation requires 24 frames for each second and if the animation is to be played back on a video monitor30 frames per seconds are required. A common graphics method employed in many commercials is morphing where one object is transformed to another.

2 Education and Training Computer generated models of physicals, financials and economic systems are often used as educational aids. Models of physical system, physiological systems, population trends or equipment such as the color coded diagram can help the trainers to understand the operation of the system. For some training application, some special systems are designed. Some of the specialized systems are the simulators for practice sessions or training of ship contains air-craft pilots, heavy equipment s operators and air-traffic control personnel. Some simulators have no video screens eg. A flight simulator with only a control panel for instrument flying. But most simulators provide graphics screens for visual operator. Image Processing Although methods used in computer graphics and image processing overlap, the two areas are concerned with fundamentally different operations. In computer graphics, computer is used to create a picture. Image processing on the other hand applied techniques to modify or interpret existing pictures, such as photographs and TV scans. Two principal applications of image processing are: 1. Improving picture quality 2. Machine perception of visual information as used in robotics. To apply image processing methods use first digitize a photographs into an image file. Then digital methods can be applied to rearrange picture parts, to enhance color separation, or to improve the quality of shading. Application areas: Commercial Art Application Analyze satellite photos of earth and galaxy photos Medical Application Graphics Systems Video Display Devices Typically the primary output device in the graphical system is a video monitor. The operation of most video monitor is based on the standard Cathode-Ray Tube (CRT) design, but several other technologies exist and solidstate monitors may eventually predominate.

3 Refresh Cathode-Ray Tubes A basic CRT architecture consist of a e guns, deflection (Moving Around) plates, phosphorus coated screen and coil. A beam of electrons (Cathode rays) emitted by an elctrogun, passes through focusing and deflects system that direct the beam towards specified position on the phosphor-coated screen. The phosphor then emits a small spot of light at each position contacted by the electron beam. Basic design of a magnetic-deflects CRT is Because the light emitted by the phosphor fades very rapidly, some methods is needed for maintaining the screen picture. One way to keep the phosphor glowing is to redraw the picture repeatedly by quickly directing the e-beam back over the same point. This type of displays is called Refresh CRT. The primary component of electron gun in a CRT are the heated metal cathode and a control grid. Heat is supplied to the cathode by directing a current via the coil of wire called filament. This causes electrons to be boiled off the

4 hot cathode surface. In the vacuum inside the CRT envelope, the free, negatively charged electrons are then accelerated toward the phosphor coating by a high positive voltage. The focusing system in a CRT is needed to force the electron beam to converge into a small spot as it strikes the phosphor. Generally the focusing system is accomplished with either electric or magnetic fields. This system is commonly used in television or computer monitor. Raster Scan Display The most common type of graphics monitor CRT is the raster-scan display, based on television technology. In a raster scan system, the electron beam is swept across the screen, one row at a time from top to bottom. As the electron beam move across each row, the beam intensity is turned on and off to create a pattern of illuminated spot. Picture definition is stored in a memory area called refresh buffer or frame buffer. This memory area holds the set of intensity values for all the screen points. Stored intensity values are then retrieved from the refresh buffer and painted on screen one row (Scan Line) at a time. Each screen point is referred to as a pixel or picture element. The capability of a raster scan system to store intensity information for each screen point makes it well suited for the realistic display of scenes containing shading and color pattern. Home television sets and printers are example of other systems using raster scan methods. Intensity range for pixel positions depends on the capability of the raster system. In a simple black and white system, each screen point is either on or off, so only one bit per pixel is needed to control the intensity of screen positions. For this system, a bit value 1 indicates that the electron beam is to be turned on at that position and a value 0 indicates that the beam intensity is to be off.

5 Other bits are needed when color and intensity variations can be displayed. Up to 24 bits per pixel are included in high quality systems, which can require several MB of storage for the frame buffer, depending on the resolution of the system. A system with 24 bits per pixel and a screen resolution of 1024 by 1024 requires 3 MB of storage of frame buffer. On a black and white system with one bit per pixel, the frame buffer is commonly called a bitmap. For system with multiple bits per pixel, the frame buffer is often called as a pixmap. Refreshing on raster-scan displayed is carried out at the rate of 60 to 80 frames per second, although some system designed for higher refresh rates. Refresh rates are described in units of cycles per second, where cycle corresponds to one frame. At the end of each scan line, the electron beam returns to the left side of screen to begin displaying next line. The return to the left of the screen, after refreshing each scan line, is called the horizontal retrace of the electron beam. At the end of each frame, the electron beam returns to the top left corner of the screen to begin the next frame is called as vertical retrace. Random Scan Display When operated as a random-scan display unit, a CRT has the electron beam directed only to the parts of the screen where a picture is to be drawn. Random scan monitors draw a picture one line at a time and for this reason are also referred to asvector displays (or stroke-writing or calligraphic displays). Refresh rate on a random-scan system depends on the number of lines to be displayed.

6 Picture definition is now stored as a set of line drawing commands in an area of memory referred to as the refresh display file. Sometimes the refresh display file is called the display list, display program, or simply the refresh buffer. To display a specified picture, the system cycles through the set of commands in the display file, drawing each component line in turn. After all line drawing command have been processed, the system cycle back to the first line of the command in the list. Random-scan systems are designed for line drawing applications and cannot display realistic shaded scenes. Since picture definition is stored as a set of line drawing instructions and not as a set of intensity values for all screen points, vector displays generally have higher resolution than raster systems. Also, vector displays produce smooth line drawings because the CRT beam directly follows the line path. A raster system, produced a jagged lines. 1.4 Color CRT Monitors A CRT monitor displays color pictures by using a combination of phosphors that emit different-colored light. By combining the emitted light from the different phosphors, a range of colors can be generated. The two basic techniques for producing color displays with a CRT are the beam-penetration method and the shadow-mask method. The beam-penetration method for displaying color pictures has been used with random-scan monitors. Two layers of phosphor, usually red and green, are coated onto the inside of the CRT screen, and the displayed color depends on how far the electron beam penetrates into the phosphor layers. A beam of slow electrons excites only the outer red layer. A beam of very fast electrons penetrates through the red layer and excites the inner green layer. At intermediate beam speeds, combinations of red and green light are emitted to show two additional colors, orange and yellow. Beam penetration has been an inexpensive way to produce color in random-scan monitors, but only four colors are possible, and the quality of pictures is not as good as with other methods. Shadow-maskmethods are commonly used in raster scan systems (including color TV) because they produce a much wider range of colors than the beam penetration method. A shadow-mask CRT has three phosphor color dots at each pixel position. One phosphor dot emits a red light, another emits a green light, and the third emits a blue light. This type of CRT has three electron guns, one for each color dot, and a shadow-mask grid just behind the phosphorcoated screen. The three electron beams are deflected and focused as a group onto the shadow mask, which contains a series of holes aligned with the phosphor-dot patterns. When the three beams pass through a hole in the shadow mask, they activate a dot triangle, which appears as a small color spot on the screen.

7 We obtain color variations in a shadow-mask CRT by varying the intensity levels of the three electron beams. By turning off the red and green guns, we get only the color coming from the blue phosphor. 1.5 Direct View Storage Tubes An alternative method for maintaining a screen image is to store the picture information inside the CRT instead of refreshing the screen. A direct-view storage tube (DVST) stores the picture information as a charge distribution just behind the phosphorcoated screen. Two electron guns are used in a DVST. One, the primary gun, is used to store the picture pattern. A primary gun produces high speed electrons which strike on the storage grid to draw the picture pattern. The continuous low speed electrons from flood guns pass through the control grid. Advantages of DVST 1. Refreshing of CRT is not required. 2. Because no refreshing is needed, very complex pictures can be displayed at very high resolutions without flicker. 3. It has a flat screen Disadvantages of DVST 1. Erasing requires removal of entire picture on the storage grid. Thus erasing & redrawing process take several seconds. 2. Erasing of selected portion of the screen is not possible. 3. Due to these disadvantages storage displays have been largely replaced by raster system.

8 Geometry and Line Generations 601-Computer Graphics Basic Geometry The smallest element which can be shown on a graph is a point. A point may be illustrated as following figure. geometry As we can see, A point A has been positioned in XY-plane and (x1, y1) is the position of a point A. This means that point A is at distance x1 in X-direction and it is at distance y1 in Y-direction from origin (0, 0). The ordered pair (x1, y1) is known as the coordinates of point A. The values of x1 and y1 are the horizontal and vertical distance respectively of the point A from the origin. Straight Line and Line Segment Any two points specified in a plane will define a line. This means, to define a line one needs at least two points. In following figure, two points P1(x1, y1) and P2(x2, y2) define a line l1.

9 Now, to define a line we need an equation: A point (xi, yi) is said to be on the line if and only if it satisfy the equation of line. The equation of a straight line can be derived with the help of slope of concept of a straight line, which measures the steepness of it. The slope is the rate at which an ordinate of point of a plane changes with respect to a change in the horizontal coordinate. This can be measured by the ratio between the differences of vertical coordinates of two points on the line to that of horizontal coordinates of those two points. Generally the notion slope is denoted by m. Thus, m=vertical distance between two points / Horizontal distance between two pints. Assume two points P1(x1, y1) and P2(x2, y2) on a line l1. For this line slope is, m= y2 y1 / x2 x1 Slope of any line can be of four types: the straight line with positive slope, the straight line with negative slope, the line with zero slope and the line with undefined slope. These types are illustrated by following figures.

10 601-Computer Graphics

11 To derive an equation of a line the concept of slope is used. The slope between any two points of a line always remains constant. Let us consider two points P1(x1, y1) and P2(x2, y2) on a line and also assume point (x, y) on the same line. According to the equation of a straight line, the slope between any two points is constant. The slope is m= y2 y / x2 x and also m= y2 y1 / x2 x1 y = mx + b Equation (2.1) The general form of a straight line is, ax + by + c = 0 Pixels and Frame Buffer

12 601-Computer Graphics The pixel is a smallest addressable screen element. It is the smallest piece of the display screen which we can control. Each pixel has name and address. The name which identify pixel corresponding to the coordinates which identify the points. Computer Graphics images are made by setting the intensity and color of pixel which compose the screen. We draw line segment by setting the intensity that is the brightness of pixels between starting pixel and ending pixel. The coordinate will be (I, j) that gives column and row of a pixel. Each pixel will be centered at the coordinate. We can place the inter values of all the pixels into an array of our computer memory that is called as frame buffer. So frame buffer is used to collect and store the pixel value for the use by a display device. Line Styles There are four different types of lines: 1. Thick Line 2. Line Caps 3. Thick Line Joints 4. Pens and Brushes 1. Thick line A line or a line segment generated by the standard DDA algorithm is of a single pixel width. Let us assume that a line with a gentle slope, that is, a slope less than one. If u need such a line segment with a thickness of three pixels, you need to put there a vertical span of three pixel for each value of x. Thus a line with any width w, can be generated just by putting a vertical span of (w/2) pixels on both the side of the central line. See below figure: Let P1(x1, y1) and P2(x2, y2) be the end points of a line segment with width w, which is to be drawn. Here two parallel line segments will be drawn from a central line (x1, y1) and (x2, y2) at distance (w/2).

13 As shown in above figure, the coordinate of end points of the upper and lower line boundaries are (x1, y1 + wy)(x2, y2 + wy) and (x1, y1 wy)(x2, y2 wy) respectively. The value of wy is given as below. wy= w 1 (Sqrt(x2 x1) 2 + (y2 y1) 2 ) / 2 x2 x1 In the above equation, w 1 is taken instead of w. the reason being, on both sides the line boundaries are drawn which are of 1 pixel in length. Therefore, from both the sides half of the pixel width will be deducted to get the exact width w. 2. Line Caps There is an issue with the thick line generated by the concept discussed here. When the thick line is generated it ends are the horizontal or vertical. This effect becomes even more prominent with thicker lines. To remove this effect, line caps can be used. There are 3 main such line caps used in graphics applications. They are butt cap, round cap and projecting square cap as illustrated in following figure.

14 The butt cap is one with which the end position of the thick lines are adjusted in such a way that the line segment appears with a square ends. The ends of such thick line are perpendicular to the original line segment. Below figure shows the construct of butt cap. In a round cap, the upper and lower line boundaries are joined by a circular arch or with a semi-circle of diameter of width same as the width of line segment. Below figure shows the construct of round cap. In projecting square cap, the portion of line segment is just extended to give a line segment an effect of square. Below figure shows the construct of project square cap. 3. Thick Lines Joint When two thick line segments are connected with each other, they create problems at the joining point. When two thick line segments are joined an angel is created at the joining point, as shown in the circle of figure below, because of the thickness.

15 The discreetness that occurs while joining two thick lines can be removed from the polylines by adding some additional portion to the joint as some specific type of joining process. These joints are miter joint, round joint and bevel joint as shown in following figure. The miter joint is one in which the exterior boundaries of two thick line segments are extended upto their intersection point-the point where these two line segments meet each other, if they are extended. In round joint, the exterior boundaries are connected with a circular arch with a diameter of total thickness of two thick lines, which are joined. The bevel joint is one where butt cap is used to draw line segment and the little triangle that is created at the joint is filled with color of these two line segments. The following figure shows the construct of above three joints. 4. Pens and Brushes

16 There are many graphics applications, which make use of different pens and brushes of different shapes. Different color is also used with different shapes of pens and brushes. Some of the brush shapes are shown in following figure. Character Generation Character almost built into the graphics display device usually as hardware but sometimes through software. There are two primary methods for character generation. 1. Stroke Method This method uses the small line segments to generate a character. The small series of line segments are drawn like a stroke of a pen to form a character as shown in the following figure. We could build our own stroke method of character generation by calling the VECGEN line drawing algorithm. We could decide what line segments are needed for each character and setup the calls to the VECGEN line drawing algorithm for each character we wish to draw. The stroke method itself changes the scale means if you want to twice a character length then in simply increase the length of each segment.

17 2. Dot Matrix Or Bitmap Method It is also called as dot matrix because in this method characters are represented by an array of dots. It is a two dimensional array having columns and rows. An 5 X 7 array is commonly used to represent a character as shown in the following figure. However 7 X 9 and 9 X 13 arrays are also used. High resolution devices such as inject printer or laser printer may use character array that are over 100 X 100. Each dot in matrix is a pixel. The character is placed on the screen by copying the pixel values from the character array into some portion of the screen s frame buffer. The dot patterns for all characters are stored in the hardware device called a charactergenerator chip. The character generator chip accepts address for the character and gives a bit pattern as an output. Aliasing and Anti-aliasing We have seen the method bitmap which is used to draw the image. The bitmap method is a method in which an array of individual pixels is used. These pixels have some shapes and dimensions too. When a line segment of an image is enlarged, the image is looked with zaggy boundaries as shown in following figure.

18 601-Computer Graphics

19 Polygon 601-Computer Graphics Polygon is a word derived from two Greek words poly and Gon. Poly means multi and Gon means angle. Thus, the meaning of polygon is multiangled figure. Polygon is a closed figure with many vertices and edges and at each vertex exactly two edges meet and no edge crosses other. polygon The line segments which make up a polygon boundary are called edges. The end points of the edges are called vertex of polygon. The simple form of possible polygon is triangle having 3 edges and 3 vertex points. Types of polygons Polygons are largely divided into two classes. 1. Convex Polygon 2. Concave Polygon 1. Convex Polygon: This polygon is a polygon in which if you take any two points of polygon then all the points on the line segment joining these two points fall within the polygon itself. 2. Concave Polygon: This polygon is a polygon in which if the line joining any two points of a polygon does not fall entirely within the polygon. Polygon inside Test It is a test to check weather a point is inside a polygon or outside. There are two different techniques for this. 1. Even Odd Method 2. Winding Number Method

20 1. Even Odd Method : Let P be a point to be tested. From P draw a line parallel to the X axes as shown in the above figure. Count the no. of intersection points with edges of polygon. If the no. of intersection points is odd then the point is inside the polygon. For P there is one intersection point. Therefore P is inside. If the no. of intersection points is even then the point is outside the polygon. For P there is two intersection points. Therefore P is outside. Now if the intersection point is the vertex of polygon, then check the other vertices of those edges. If other end points of those edges lie at opposite side of the straight line, then the no. of intersection is odd. If other end points of edges lie on the same side of parallel, then the no. of intersections is even. Therefore the point P is inside the polygon and point P is outside the polygon.

21 Circumstances where Even-Odd method fails Overlapping Polygon: As shown in the figure, for point P numbers of intersection are even. Thus according to Even Odd method the point P must be outside the polygon. But this point is inside the polygon so in such a condition where a polygon is complex or overlapped then the Even Odd method will not work. For that the winding no. method is used. 2. Winding No. Method: In this method, give direction to each and every edge as shown in following figure. Check the direction of edges and number of edges intersected by the straight line parallel to X axes. If the direction is upward, count 1 and if the direction is downwards then count is +1. No. of winding is not equal to zero than point is inside or if it is equals to 0 then the point is outside the polygon. For the figure shown below for point p summation of winding no. is,

22 For Point P, Σ winding no. = -1-1 = -2, that is not equal to zero so point is inside the polygon. For Point P, Σ winding no. = = 0, that is equal to zero so point is outside the polygon. Circumstances where winding no. method fails: When the straight line is passes through the vertex then we are bound to apply the Even -Odd method. Polygon Area Filling To make the polygon figure to look like a solid object, it is required to be fill in with some color or pattern polygon area filling means changing the color of pixel belonging to the polygon. This can be done by different methods which are used popularly for polygon filling. There are three different methods 1. Flood Fill Method 2. Scan Line Fill Method 3. Filling Polygon with pattern

23 1. Flood Fill Method: It is also known as seed fill method. In this method, appoint inside a polygon is needed. This point is called as seed point and the process of filling the polygon area is started from this points. From the seed point, a point is taken and interior color is replaced by the required color. This process is done till a pixel of boundary color is reached. This process is performed simultaneously in all directions. This can be done in two ways. Four Connected Point Neighborhood Method Eight Connected Point Neighborhood Method? 1 In first method, four surrounded pixels are taken simultaneously and replaced with the required color. In second method, eight surrounded pixels are taken simultaneously and replaced with the required color. Obviously, recursive function is the best suited concept for the flood fill algorithm. Void fill4 (int x, int y, int fill, int oldcolor) 2 3 {

24 4 If( getpixel (x, y) == oldcolor) 5 6 { Putpixel (x, y, fill); fill4 (x+1, y, fill, oldcolor); fill4 (x-1, y, fill, oldcolor); fill4 (x, y+1, fill, oldcolor); fill4 (x, y-1, fill, oldcolor); } } If we do not have a seed point to fill the polygon, we can turn on all the pixels which are inside the polygon but the problem is that, these needs inside test to be perform with each and every pixel on the screen which is very time consuming. 2. Scan Line Fill Method: This method is also called alternative fill method. The scan line fill method is a very efficient & cheaper alternative. This is the method in which scan line are used for the filling process. Scan line fill method works very efficiently with self-intersecting polygons as well.

25 Checking for each and every pixel on the screen is very time consuming & costly too but we can restrict this process to the smallest rectangle which fits the polygon. That means the rectangle created from the lower left coordinate of the polygon to upper right coordinate of the polygon. If we consider largest y value and go through the smallest value of y by scanning left to right, for each value of y horizontal straight lines will be generated. Each of these horizontal lines is called a scan line. As our algorithm is using scan line, it is called scan line fill algorithm. Assume that we have a boundary of a blank polygon in our empty frame buffer, which is bounded by smallest possible rectangle around it as shown in above figure. Let us examine all pixels in the box scan line by scan line and when we encounter a pixel with the intensity of the polygon boundary pixel, we enter into polygon. We will remain in the polygon till we encounter a second pixel with the intensity of polygon boundary. All in between pixel are turned on. The major difficulty with this scheme is with a point, where two edges where two edges meet each other. For example, see the vertex I in the following figure. This problem can be solved

26 by considering line instructions stored in display file instead of considering boundary point from the frame buffer. Finding intersection point is very easy if the line equations of two lines are known. Again here, there is no need to test each and every edge of the polygon for the intersection with intersection with each scan line. It is sufficient to test only those edges of the polygon for which y value of scan line lies between maximum and minimum y values of the polygon side. This can be easier by logically arranging all the edges of the polygon in the order of their values of y. Every time we stop down to new scan line, we have to check which are the edges being considered and also examine which are the edges to be dropdown from consideration. This can be done, simply by examining the lowest and the highest y value of the top edges in the indexed edges list with y value of the scan line. All the edges for which y value of current scan line lies between y values of its end points, are under consideration. Above figure shows how edges are considered in figure (A) for the intersection with a scan line & figure (B) when an edge is dropped from the consideration. Once we get the intersection points on polygon edges with the horizontal scan line, our task is to turn on all the pixels on the scan line which are inside the polygon drawing line between intersection points using our standard line drawing algorithm or any other equation algorithm can do this.

27 In the above figure, pixels between the intersection points 1 & 2 and 3 & 4 belong to the polygon whereas pixels between the intersection points 2 & 3 are outside the polygon. To reduce this problem, we have to draw a line between two successive intersection points starting from odd no. of intersection points. Therefore now a line segment will be drawn between the intersection points 1 & 2, and 3 & 4 whereas no line will be drawn from the odd no. of intersection points i.e. point 2 & point 3. In other words, arrange all intersection points in the order of their x values; the smallest x value is the left most boundary & the largest x value will be on the right most boundary of the polygon. Now draw line segment s between the successive pair of x values. Here it is very important to note that when our scan line passes through a point, which is shared by two edges of the polygon. The intersections are determined by the even odd method. Let us list the steps of the scan line fill method in order to summarize. 1) Determine the smallest possible rectangle, which fits in the polygon to be filled. 2) Arrange all the edges of polygon in the order of y values. 3) Determine all the polygon edges which are required to be considered with the current scan line. 4) Find the intersection points between two successive pairs of the intersection points. 5) Arrange all intersection points in the order of their x values. 6) Draw a line segment between two successive pairs of intersection points. 7) Shift to the next scan line and also check for the possible exclusion and inclusion of new boundary of the polygon for the consideration. 3. Filling Polygon with pattern: Many times polygons are needed to be filled in with a pattern instead of color. In such situation, the method discussed in the earlier sections cannot be used. Filling the polygon with a given pattern is a very easy process with raster display. The method of filling a polygon with a pattern is also known as pattern filling. Pattern fill is nothing but filling a predefined pattern respectively, side by side all over the interior part of the polygon.

28 In flood fill algorithm, we change the color of all the pixels which are inside the polygon. Here, we have to do the same thing but every time an interior pixel will be checked with an appropriate pattern pixel and accordingly it will be colored. For this we need, predefined pattern matrices. According to pattern fill, consider a smallest rectangle with in which the polygon fits perfectly. Now take the first pixel from the pattern matrix and check the first pixel of the rectangle and if that pixel is inside the polygon, then copy all the details of the first pixel from the pattern matrix to the first pixel of the polygon. Do this process for all the pixels of pattern matrix and for all the pixel of the given polygon. 4. Boundary Fill: Boundary fill algorithm is another polygon or area filling algorithm. The problem with the scan line fill algorithm is that every scan line, intersection points between the scan line and the polygon sides are to be found, which very much complex and time is consuming as well. This boundary fill algorithm uses scan line to fill polygons but it does not require cumbersome calculation of finding intersection points. This algorithm only needs an inside point to start the process, color of the boundary and a stack. Let (x, y) be an inside point. Starting from this point, the algorithm tests neighboring pixel on the same scan line to determine whether it is of boundary color or not. If it is having boundary color, the algorithm will stop in that direction for that scan line. If the color of the pixels is not same as needed, then that pixel will be colored by the desired color and then the next pixel is checked. This process will be repeated for all the pixels till the boundary color pixel is reached. This process will be performed on all the scan line of the polygon. To remember the position of pixels, a stack may be used. The following figure shows the process of boundary fill, the arrows show the direction of painting the color of pixels.

29 When the process begins, the start position will be pushed on to the stack, that is row six R6 will be pushed. When it reaches the right boundary, R7 will be pushed on to the stack. When painting of row seven will end at the left boundary, R7 will be popped out from the stack and R8 will be pushed in the stack. When this process is completed for the upper part of the image, the stack position is same as shown in the following figure. Now again row R7 will be painted but now in the opposite direction and this will complete the painting the lower part of the polygon.

30 Transformations In most of the application of graphics, the objects or images are required to be manipulated or altered. To add reality or feel like reality, many times these objects are needed to be moved, rotated or even in some applications, enlarged or reduced. This alteration or manipulation processes of objects is called images or objects transformation. Basic Transformation There are three basic actions or movements, moving, scaling and rotating which are widely used in the graphics applications. These movements are performed through some basic geometry. Since these transformations are performed using geometry, they are also known asgeometric transformation. There are three basic transformations, translation, scaling and rotation. 1. Scaling: Scaling transformation is used to alter the size of the given objects. The alteration of size of the object is defined by the factor. The scale factor specifies how big or small the object should be after alteration. To alter the size of any object in the horizontal direction the scale factor Sx is used, whereas alter in the vertical direction the scale factor Sy is used. The scaling transformation is performed simply by multiplying the (x, y) coordinate values by scale factors of horizontal and vertical directions, that is Sx and Sy respectively. Mathematical representation of transformation of original coordinates (x, y) into scaled transformed coordinates (x, y ) is, X = Sx X and Y = SyY To scale a polygon, this transformation is performed on all the vertices of a given polygon. To enlarge or double the size of the polygon horizontally, the X coordinate of all the vertices need to be multiplied by 2. That is in this case the X Scale factor Sx = 2. Similarly, if we want to reduce the size of object vertically by half, the Y-coordinates of the vertices are multiplied by the Y-scale factor Sy = (1/2). * X Y + = * X Y + *Sx 0 + *0 Sy] Which is equivalent to P = P. S Where P is a 1 * 2 row matrix of scaled coordinates, P is again a 1 * 2 row matrix of original coordinates, and S is a 2 * 2 scaling transformation matrix. Since Sx and Sy are scale factors they are always positive. Also, the values of Sx and Sy greater than 1 will enlarge the object in horizontal or vertical direction respectively whereas their values between 0 and 1 will reduce the object in the respective directions. Obviously, if the values of Sx and Sy are equal to 1, then the scaling matrix will turn into a unit matrix and therefore there will be no change in the scaled coordinates. When the object is altered with same scale factor for both the horizontal and vertical directions, i.e. Sx =

31 Sy, the scaling transformation is known uniform scaling transformation otherwise it is called differential scaling transformation as illustrated in following figure. Thus, to perform scaling on an object, the scaling transformation is performed on all the vertices of the object. Here it will be interesting and important to observe that by doing this; the position of the altered object will be changed along the transformation. But almost all the graphical application need to keep the object at its original position or some pre-specified position (Xk, Yk) even after scale transformation. This scaling transformation relative to a fixed to a point (Xk, Yk) is done by the following set of equations. X = X Sx + ( Xk Xk Sx) Y = Y Sy + ( Yk Yk Sy) OR X = X Sx + Xk (1 Sx)

32 Y = Y Sy + Yk (1 Sy) In the matrix form, this equation can be represented as follows: * X Y + = * X Y + * Sx * Xk (1 Sx) Yk (1 Sy) ] [ 0 Sy ] Where Xk (1 Sx) and Yk (1 Sy) are constant terms which are added to the original scale transformation as shown in this equation: * X Y ] = [ X Y ] [ Sx 0 ] [ 0 Sy ] The above example will work with the objects which are defined by the straight lines. Bit when the objects or shapes like circles and ellipses are there, the above mentioned equation or matrices will not work. For scaling these types of objects, the scaling transformation is performed on their parameters. Ex. On the radius for a circle and on the semi-major and semi-minor axes for and ellipses. 2. Translation: Translation an object means moving and objects from one place to another. Translation of an object is possible in any one of the following directions: (1) Translation of an object in the horizontal direction, which is translation parallel to X- axis. (2) Translation of object in the vertical direction, which is translation parallel to Y-axis. (3) Translation of object in the vertical and horizontal direction, simultaneously. It is very simple to understand translation. Suppose we want to move a point (x, y) in the horizontal direction, that is in direction parallel X-axis by Tx units, then this movement can be obtain by simple adding Tx to X-coordinate. The coordinate of points after translation will be, X = X + Tx Y = Y Similarly, to move a point (x, y) in the vertical direction that is in the direction parallel to Y-axis Ty is added to the Y-coordinate value. In this case, the coordinate of translation point will be, X = X Y = Y + Ty In the above equation, Tx and Ty are translation for translating a point in the X- direction and the Y-direction respectively. The general form translation is, (X Y ) = (X + Tx, y + Ty) or *X Y + = *X Y+ + *Tx Ty+ or P = P + T Where P is a 1 * 2 row matrix of coordinates of the translation point, P is the 1 * 2 row factors.

33 Translation transformation is a rigid-body transformation. A transformation is called a rigid-body transformation if the Euclidean distance between any two coordinates remains unchanged by the transformation. Here also translation is performed on each and every vertex of an object to translate the entire object. After finding all the new vertices, the object is redrawn by new derived vertices. Translation of other object like circles and ellipses is performed by translating their parameters. For e.g. center point of a circle. Translation is performed after scaling is done on the object to put it back on the desired place by using the equation of: * X Y + = * X Y + * Sx [ Xk (1 Sx) Yk (1 Sy)] [ 0 Sy] 3. Rotation: Rotation is the most exciting transformation. This transformation moves an object on a circular path about an origin. This transformation requires two major parameters that are dimension and angle of rotation. Any given object can be rotated either in clockwise direction or in anti-clockwise direction by a given angle θ. In the 2-dimensional rotation as, mentioned earlier, the object is rotated around a fixed point either an original or a given point (This point is called as rotation point.) Therefore, this rotation can also be declared as rotation around an axis which is called

34 as rotation axis. Essentially, this rotation axis passes through rotation point and is perpendicular to the XY-plane as illustrated in figure. Let us take a point P(x, y) to be rotated in the anticlockwise direction. The point P'(x, y ) is a rotated point, which is the result of anticlockwise rotation transformation performed on point P(x, y) with angle θ angle relative to origin (0, 0). Ø is an angle of a point P from X-axis. According to simple trigonometric principles. X = r cos Ø, y = sin Ø -> 1 Where r is the length of OP, or the distance of point P from the origin (0, 0). And, x = r cos(θ + Ø), y = r sin(θ + Ø) -> 2 In the matrix notation it can be represented as, * X Y + = * X Y + * cos θ sin θ + * -sin θ cos θ+ P = P. Ra

35 In above equation, Ra is the rotation transformation matrix for rotating a point P in anticlockwise direction with angle θ relative to origin. Similarly, we can derive the equation to rotate a point in clockwise direction by angle θ about the origin. The rotation figure is Here we are rotating point P(x, y) in opposite direction of that we did in the anticlockwise rotation. That is how in this case angle will be θ. Rc = [ cos -θ sin -θ + * cos θ -sin θ + * -sin -θ cos -θ+ * sin θ cos θ+ Rc is a rotation transformation matrix to rotate a point in clockwise direction by θ angle relative to the origin.

36 DDA and Bresenham s Line Drawing Algorithm DDA (Digital Differential Analyzer) Line Drawing Algorithm: It is a mechanical device for integrating differential equations by simultaneously incrementing x and y in small steps proportional to DX and DY. The line end points are (xa,ya) and (xb,yb). Step 1: Compute DX and DY DX=xb-xa DY=yb-ya Step 2: Calculate Steps If abs(dx) > abs(dy) Then Steps=abs(DX) Else Steps=abs(DY) End if Step 3: Calculate Xincrement and Yincrement Xincr=DX/Steps Yinct=DY/Steps Step 4: Set Initial Point to x,y X=xa Y=ya I=1 Step 5: Repeat while I<=Steps SetPixel(x,y) X=x+xincr Y=y+yincr I=I+1 End While Bresenham s Line-Drawing Algorithm

37 An accurate and efficient line-generating algorithm, developed by Bresenham, scan converts lines using only incremental integer calculations that can be adapted to display circles and other curves. Pixel positions along a line path are determined by sampling at unit x intervals. Starting from the left end point (X0,Y0) of a given line,we step to each successive column (x position) and plot the pixel whose scan-line y value is closed to the line path. Assuming we have determined that the pixel at (Xk,Yk) is to be displayed, we next need to decide which pixel to plot in column Xk+1. Our choices are the pixels at positions (Xk+1,Yk) and (Xk+1,Yk+1). If pixel Yk is closer to the line path than the pixel at Yk+1, then decision parameter Pk is negative. In that case, we plot the lower pixel; otherwise, we plot the upper pixel. The term Yk+1 Yk is either 0 or 1, depending on the sign of parameter Pk. The first parameter P0 is evaluated at the starting pixel position (X0,Y0) and with M evaluated as DY/DX. P0=2DY-DX. The constants are 2DY if Pk <0 and 2DY-2DX if Pk>0 are calculated for each line to be scan converted, so the arithmetic involves only integer addition and subtraction of these two constants. Bresenham s Line-Drawing Algorithm for m < 1 (gentle slope) Step 1: Input the two line end points. Step 2: Calculate constants. Obtain the starting value for the decision parameter. DX=abs(xa-xb) DY=abs(ya-yb) P=2DY-DX Inc1=2DY Inc2=2DY-2DX Step 3: Determine which point to use as start, which as end. If (xa < xb) X=xa Y=ya Xend=xb Else X=xb Y=yb Xend=xa Step 4: At each Xk along the line, starting at k=0, perform the following test. If Pk<0, the next point to plot is (Xk+1,Yk) and

38 Pk=Pk+inc1 Otherwise, the next point to plot is (Xk+1,Yk+1) and Pk+1=Pk+inc2 Step 5: Plot the First Pixel. Step 6 : Repeat step 4 and 5, DX times.

Chapter - 2: Geometry and Line Generations

Chapter - 2: Geometry and Line Generations Chapter - 2: Geometry and Line Generations In Computer graphics, various application ranges in different areas like entertainment to scientific image processing. In defining this all application mathematics

More information

Overview of Computer Graphics

Overview of Computer Graphics Application of Computer Graphics UNIT- 1 Overview of Computer Graphics Computer-Aided Design for engineering and architectural systems etc. Objects maybe displayed in a wireframe outline form. Multi-window

More information

Computer Graphics Lecture Notes

Computer Graphics Lecture Notes Computer Graphics Lecture Notes UNIT- Overview of Computer Graphics. Application of Computer Graphics Computer-Aided Design for engineering and architectural systems etc. Objects maybe displayed in a wireframe

More information

About the Tutorial. Audience. Prerequisites. Copyright & Disclaimer. Computer Graphics

About the Tutorial. Audience. Prerequisites. Copyright & Disclaimer. Computer Graphics r 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 process. Various algorithms and techniques are used to generate

More information

CS6504 & Computer Graphics Unit I Page 1

CS6504 & Computer Graphics Unit I Page 1 Introduction Computer contains two components. Computer hardware Computer hardware contains the graphics workstations, graphic input devices and graphic output devices. Computer Software Computer software

More information

CS602 Midterm Subjective Solved with Reference By WELL WISHER (Aqua Leo)

CS602 Midterm Subjective Solved with Reference By WELL WISHER (Aqua Leo) CS602 Midterm Subjective Solved with Reference By WELL WISHER (Aqua Leo) www.vucybarien.com Question No: 1 What are the two focusing methods in CRT? Explain briefly. Page no : 26 1. Electrostatic focusing

More information

Einführung in Visual Computing

Einführung in Visual Computing Einführung in Visual Computing 186.822 Rasterization Werner Purgathofer Rasterization in the Rendering Pipeline scene objects in object space transformed vertices in clip space scene in normalized device

More information

Graphics (Output) Primitives. Chapters 3 & 4

Graphics (Output) Primitives. Chapters 3 & 4 Graphics (Output) Primitives Chapters 3 & 4 Graphic Output and Input Pipeline Scan conversion converts primitives such as lines, circles, etc. into pixel values geometric description a finite scene area

More information

MET71 COMPUTER AIDED DESIGN

MET71 COMPUTER AIDED DESIGN UNIT - II BRESENHAM S ALGORITHM BRESENHAM S LINE ALGORITHM Bresenham s algorithm enables the selection of optimum raster locations to represent a straight line. In this algorithm either pixels along X

More information

Computer Graphics. Attributes of Graphics Primitives. Somsak Walairacht, Computer Engineering, KMITL 1

Computer Graphics. Attributes of Graphics Primitives. Somsak Walairacht, Computer Engineering, KMITL 1 Computer Graphics Chapter 4 Attributes of Graphics Primitives Somsak Walairacht, Computer Engineering, KMITL 1 Outline OpenGL State Variables Point Attributes t Line Attributes Fill-Area Attributes Scan-Line

More information

Computer Graphics. Chapter 4 Attributes of Graphics Primitives. Somsak Walairacht, Computer Engineering, KMITL 1

Computer Graphics. Chapter 4 Attributes of Graphics Primitives. Somsak Walairacht, Computer Engineering, KMITL 1 Computer Graphics Chapter 4 Attributes of Graphics Primitives Somsak Walairacht, Computer Engineering, KMITL 1 Outline OpenGL State Variables Point Attributes Line Attributes Fill-Area Attributes Scan-Line

More information

Output Primitives Lecture: 3. Lecture 3. Output Primitives. Assuming we have a raster display, a picture is completely specified by:

Output Primitives Lecture: 3. Lecture 3. Output Primitives. Assuming we have a raster display, a picture is completely specified by: Lecture 3 Output Primitives Assuming we have a raster display, a picture is completely specified by: - A set of intensities for the pixel positions in the display. - A set of complex objects, such as trees

More information

Unit 2 Output Primitives and their Attributes

Unit 2 Output Primitives and their Attributes Unit 2 Output Primitives and their Attributes Shapes and colors of the objects can be described internally with pixel arrays or with sets of basic geometric structures, such as straight line segments and

More information

Computer Graphics. - Rasterization - Philipp Slusallek

Computer Graphics. - Rasterization - Philipp Slusallek Computer Graphics - Rasterization - Philipp Slusallek Rasterization Definition Given some geometry (point, 2D line, circle, triangle, polygon, ), specify which pixels of a raster display each primitive

More information

UNIT 2 GRAPHIC PRIMITIVES

UNIT 2 GRAPHIC PRIMITIVES UNIT 2 GRAPHIC PRIMITIVES Structure Page Nos. 2.1 Introduction 46 2.2 Objectives 46 2.3 Points and Lines 46 2.4 Line Generation Algorithms 48 2.4.1 DDA Algorithm 49 2.4.2 Bresenhams Line Generation Algorithm

More information

Computer graphics 2 Marks 1. Define Computer graphics.

Computer graphics 2 Marks 1. Define Computer graphics. Computer graphics 2 Marks 1. Define Computer graphics. Computer graphics remains one of the most existing and rapidly growing computer fields. Computer graphics may be defined as a pictorial representation

More information

OpenGL Graphics System. 2D Graphics Primitives. Drawing 2D Graphics Primitives. 2D Graphics Primitives. Mathematical 2D Primitives.

OpenGL Graphics System. 2D Graphics Primitives. Drawing 2D Graphics Primitives. 2D Graphics Primitives. Mathematical 2D Primitives. D Graphics Primitives Eye sees Displays - CRT/LCD Frame buffer - Addressable pixel array (D) Graphics processor s main function is to map application model (D) by projection on to D primitives: points,

More information

Graphics Hardware and Display Devices

Graphics Hardware and Display Devices Graphics Hardware and Display Devices CSE328 Lectures Graphics/Visualization Hardware Many graphics/visualization algorithms can be implemented efficiently and inexpensively in hardware Facilitates interactive

More information

Chapter 5. Transforming Shapes

Chapter 5. Transforming Shapes Chapter 5 Transforming Shapes It is difficult to walk through daily life without being able to see geometric transformations in your surroundings. Notice how the leaves of plants, for example, are almost

More information

CS 543: Computer Graphics. Rasterization

CS 543: Computer Graphics. Rasterization CS 543: Computer Graphics Rasterization Robert W. Lindeman Associate Professor Interactive Media & Game Development Department of Computer Science Worcester Polytechnic Institute gogo@wpi.edu (with lots

More information

UNIT 2 2D TRANSFORMATIONS

UNIT 2 2D TRANSFORMATIONS UNIT 2 2D TRANSFORMATIONS Introduction With the procedures for displaying output primitives and their attributes, we can create variety of pictures and graphs. In many applications, there is also a need

More information

COMP371 COMPUTER GRAPHICS

COMP371 COMPUTER GRAPHICS COMP371 COMPUTER GRAPHICS LECTURE 14 RASTERIZATION 1 Lecture Overview Review of last class Line Scan conversion Polygon Scan conversion Antialiasing 2 Rasterization The raster display is a matrix of picture

More information

640008: Computer Graphics

640008: Computer Graphics Q. What is interactive computer graphics? List the applications of computer graphics. What are components of ICG graphic package? Interactive computer graphics (ICG): It is study of techniques to improve

More information

Computer Graphics Solved MCQs -Part 2 MCQs Questions

Computer Graphics Solved MCQs -Part 2 MCQs Questions http://itbookshub.com/ Computer Graphics Solved MCQs -Part 2 MCQs Multiple Choice Questions Computer Graphics Solved MCQs -Part 2 Two consecutive scaling transformation s1 and s2 are Additive Multiplicative

More information

CS602 MCQ,s for midterm paper with reference solved by Shahid

CS602 MCQ,s for midterm paper with reference solved by Shahid #1 Rotating a point requires The coordinates for the point The rotation angles Both of above Page No 175 None of above #2 In Trimetric the direction of projection makes unequal angle with the three principal

More information

Introduction to Computer Graphics

Introduction to Computer Graphics Introduction to 1.1 What is computer graphics? it would be difficult to overstate the importance of computer and communication technologies in our lives. Activities as wide-ranging as film making, publishing,

More information

SE Mock Online Test 1-CG

SE Mock Online Test 1-CG SE Mock Online Test 1-CG 1. Email address * 2. 1. For gentle slope line, slope m is -1

More information

CS 4300 Computer Graphics. Prof. Harriet Fell Fall 2012 Lecture 5 September 13, 2012

CS 4300 Computer Graphics. Prof. Harriet Fell Fall 2012 Lecture 5 September 13, 2012 CS 4300 Computer Graphics Prof. Harriet Fell Fall 2012 Lecture 5 September 13, 2012 1 Today s Topics Vectors review Shirley et al. 2.4 Rasters Shirley et al. 3.0-3.2.1 Rasterizing Lines Shirley et al.

More information

Computer Graphics Prof. Sukhendu Das Dept. of Computer Science and Engineering Indian Institute of Technology, Madras Lecture - 14

Computer Graphics Prof. Sukhendu Das Dept. of Computer Science and Engineering Indian Institute of Technology, Madras Lecture - 14 Computer Graphics Prof. Sukhendu Das Dept. of Computer Science and Engineering Indian Institute of Technology, Madras Lecture - 14 Scan Converting Lines, Circles and Ellipses Hello everybody, welcome again

More information

Chapter 5. Projections and Rendering

Chapter 5. Projections and Rendering Chapter 5 Projections and Rendering Topics: Perspective Projections The rendering pipeline In order to view manipulate and view a graphics object we must find ways of storing it a computer-compatible way.

More information

Chapter 3. Sukhwinder Singh

Chapter 3. Sukhwinder Singh Chapter 3 Sukhwinder Singh PIXEL ADDRESSING AND OBJECT GEOMETRY Object descriptions are given in a world reference frame, chosen to suit a particular application, and input world coordinates are ultimately

More information

Write C++/Java program to draw line using DDA and Bresenham s algorithm. Inherit pixel class and Use function overloading.

Write C++/Java program to draw line using DDA and Bresenham s algorithm. Inherit pixel class and Use function overloading. Group A Assignment No A1. Write C++/Java program to draw line using DDA and Bresenham s algorithm. Inherit pixel class and Use function overloading. Aim: To draw line using DDA and Bresenham s algorithm

More information

(Refer Slide Time: 00:02:00)

(Refer Slide Time: 00:02:00) Computer Graphics Prof. Sukhendu Das Dept. of Computer Science and Engineering Indian Institute of Technology, Madras Lecture - 18 Polyfill - Scan Conversion of a Polygon Today we will discuss the concepts

More information

Cs602-computer graphics MCQS MIDTERM EXAMINATION SOLVED BY ~ LIBRIANSMINE ~

Cs602-computer graphics MCQS MIDTERM EXAMINATION SOLVED BY ~ LIBRIANSMINE ~ Cs602-computer graphics MCQS MIDTERM EXAMINATION SOLVED BY ~ LIBRIANSMINE ~ Question # 1 of 10 ( Start time: 08:04:29 PM ) Total Marks: 1 Sutherland-Hodgeman clipping algorithm clips any polygon against

More information

COMPUTER GRAPHICS. Computer Multimedia Systems Department Prepared By Dr Jamal Zraqou

COMPUTER GRAPHICS. Computer Multimedia Systems Department Prepared By Dr Jamal Zraqou COMPUTER GRAPHICS Computer Multimedia Systems Department Prepared By Dr Jamal Zraqou Introduction What is Computer Graphics? Applications Graphics packages What is Computer Graphics? Creation, Manipulation

More information

How to draw and create shapes

How to draw and create shapes Adobe Flash Professional Guide How to draw and create shapes You can add artwork to your Adobe Flash Professional documents in two ways: You can import images or draw original artwork in Flash by using

More information

(Refer Slide Time: 9:36)

(Refer Slide Time: 9:36) Computer Graphics Prof. Sukhendu Das Dept. of Computer Science and Engineering Indian Institute of Technology, Madras Lecture - 13 Scan Converting Lines, Circles and Ellipses Hello and welcome to the lecture

More information

CSCI 4620/8626. Coordinate Reference Frames

CSCI 4620/8626. Coordinate Reference Frames CSCI 4620/8626 Computer Graphics Graphics Output Primitives Last update: 2014-02-03 Coordinate Reference Frames To describe a picture, the world-coordinate reference frame (2D or 3D) must be selected.

More information

Raster Scan Displays. Framebuffer (Black and White)

Raster Scan Displays. Framebuffer (Black and White) Raster Scan Displays Beam of electrons deflected onto a phosphor coated screen Phosphors emit light when excited by the electrons Phosphor brightness decays -- need to refresh the display Phosphors make

More information

CS 130 Final. Fall 2015

CS 130 Final. Fall 2015 CS 130 Final Fall 2015 Name Student ID Signature You may not ask any questions during the test. If you believe that there is something wrong with a question, write down what you think the question is trying

More information

Computer Graphics and Visualization. Graphics Systems and Models

Computer Graphics and Visualization. Graphics Systems and Models UNIT -1 Graphics Systems and Models 1.1 Applications of computer graphics: Display Of Information Design Simulation & Animation User Interfaces 1.2 Graphics systems A Graphics system has 5 main elements:

More information

SRM INSTITUTE OF SCIENCE AND TECHNOLOGY

SRM INSTITUTE OF SCIENCE AND TECHNOLOGY SRM INSTITUTE OF SCIENCE AND TECHNOLOGY DEPARTMENT OF INFORMATION TECHNOLOGY QUESTION BANK SUB.NAME: COMPUTER GRAPHICS SUB.CODE: IT307 CLASS : III/IT UNIT-1 2-marks 1. What is the various applications

More information

In today s lecture we ll have a look at: A simple technique The mid-point circle algorithm

In today s lecture we ll have a look at: A simple technique The mid-point circle algorithm Drawing Circles In today s lecture we ll have a look at: Circle drawing algorithms A simple technique The mid-point circle algorithm Polygon fill algorithms Summary raster drawing algorithms A Simple Circle

More information

AQA GCSE Further Maths Topic Areas

AQA GCSE Further Maths Topic Areas AQA GCSE Further Maths Topic Areas This document covers all the specific areas of the AQA GCSE Further Maths course, your job is to review all the topic areas, answering the questions if you feel you need

More information

Advantages: Disadvantages: Q.1 Explain raster scan display with its advantages and disadvantages?

Advantages: Disadvantages: Q.1 Explain raster scan display with its advantages and disadvantages? Max Marks: 10 Subject: Computer Graphics & Multimedia (7 th Semester IT 2017-18) Time: 1hr Q.1 Explain raster scan display with its advantages and disadvantages? Ans: In a raster scan system, the electron

More information

2D Object Definition (1/3)

2D Object Definition (1/3) 2D Object Definition (1/3) Lines and Polylines Lines drawn between ordered points to create more complex forms called polylines Same first and last point make closed polyline or polygon Can intersect itself

More information

Computer Graphics. Chapter 1 (Related to Introduction to Computer Graphics Using Java 2D and 3D)

Computer Graphics. Chapter 1 (Related to Introduction to Computer Graphics Using Java 2D and 3D) Computer Graphics Chapter 1 (Related to Introduction to Computer Graphics Using Java 2D and 3D) Introduction Applications of Computer Graphics: 1) Display of Information 2) Design 3) Simulation 4) User

More information

COMP30019 Graphics and Interaction Scan Converting Polygons and Lines

COMP30019 Graphics and Interaction Scan Converting Polygons and Lines COMP30019 Graphics and Interaction Scan Converting Polygons and Lines Department of Computer Science and Software Engineering The Lecture outline Introduction Scan conversion Scan-line algorithm Edge coherence

More information

0. Introduction: What is Computer Graphics? 1. Basics of scan conversion (line drawing) 2. Representing 2D curves

0. Introduction: What is Computer Graphics? 1. Basics of scan conversion (line drawing) 2. Representing 2D curves CSC 418/2504: Computer Graphics Course web site (includes course information sheet): http://www.dgp.toronto.edu/~elf Instructor: Eugene Fiume Office: BA 5266 Phone: 416 978 5472 (not a reliable way) Email:

More information

Part 3: 2D Transformation

Part 3: 2D Transformation Part 3: 2D Transformation 1. What do you understand by geometric transformation? Also define the following operation performed by ita. Translation. b. Rotation. c. Scaling. d. Reflection. 2. Explain two

More information

2D rendering takes a photo of the 2D scene with a virtual camera that selects an axis aligned rectangle from the scene. The photograph is placed into

2D rendering takes a photo of the 2D scene with a virtual camera that selects an axis aligned rectangle from the scene. The photograph is placed into 2D rendering takes a photo of the 2D scene with a virtual camera that selects an axis aligned rectangle from the scene. The photograph is placed into the viewport of the current application window. A pixel

More information

EF432. Introduction to spagetti and meatballs

EF432. Introduction to spagetti and meatballs EF432 Introduction to spagetti and meatballs CSC 418/2504: Computer Graphics Course web site (includes course information sheet): http://www.dgp.toronto.edu/~karan/courses/418/fall2015 Instructor: Karan

More information

Chapter 8: Implementation- Clipping and Rasterization

Chapter 8: Implementation- Clipping and Rasterization Chapter 8: Implementation- Clipping and Rasterization Clipping Fundamentals Cohen-Sutherland Parametric Polygons Circles and Curves Text Basic Concepts: The purpose of clipping is to remove objects or

More information

Rasterization: Geometric Primitives

Rasterization: Geometric Primitives Rasterization: Geometric Primitives Outline Rasterizing lines Rasterizing polygons 1 Rasterization: What is it? How to go from real numbers of geometric primitives vertices to integer coordinates of pixels

More information

FROM VERTICES TO FRAGMENTS. Lecture 5 Comp3080 Computer Graphics HKBU

FROM VERTICES TO FRAGMENTS. Lecture 5 Comp3080 Computer Graphics HKBU FROM VERTICES TO FRAGMENTS Lecture 5 Comp3080 Computer Graphics HKBU OBJECTIVES Introduce basic implementation strategies Clipping Scan conversion OCTOBER 9, 2011 2 OVERVIEW At end of the geometric pipeline,

More information

Rasterization, or What is glbegin(gl_lines) really doing?

Rasterization, or What is glbegin(gl_lines) really doing? Rasterization, or What is glbegin(gl_lines) really doing? Course web page: http://goo.gl/eb3aa February 23, 2012 Lecture 4 Outline Rasterizing lines DDA/parametric algorithm Midpoint/Bresenham s algorithm

More information

Unit 1, Lesson 1: Moving in the Plane

Unit 1, Lesson 1: Moving in the Plane Unit 1, Lesson 1: Moving in the Plane Let s describe ways figures can move in the plane. 1.1: Which One Doesn t Belong: Diagrams Which one doesn t belong? 1.2: Triangle Square Dance m.openup.org/1/8-1-1-2

More information

form are graphed in Cartesian coordinates, and are graphed in Cartesian coordinates.

form are graphed in Cartesian coordinates, and are graphed in Cartesian coordinates. Plot 3D Introduction Plot 3D graphs objects in three dimensions. It has five basic modes: 1. Cartesian mode, where surfaces defined by equations of the form are graphed in Cartesian coordinates, 2. cylindrical

More information

About the Tutorial. Audience. Prerequisites. Copyright & Disclaimer. Computer Graphics

About the Tutorial. Audience. Prerequisites. Copyright & Disclaimer. Computer Graphics r 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 process. Various algorithms and techniques are used to generate

More information

Scan Conversion. Drawing Lines Drawing Circles

Scan Conversion. Drawing Lines Drawing Circles Scan Conversion Drawing Lines Drawing Circles 1 How to Draw This? 2 Start From Simple How to draw a line: y(x) = mx + b? 3 Scan Conversion, a.k.a. Rasterization Ideal Picture Raster Representation Scan

More information

RASTERIZING POLYGONS IN IMAGE SPACE

RASTERIZING POLYGONS IN IMAGE SPACE On-Line Computer Graphics Notes RASTERIZING POLYGONS IN IMAGE SPACE Kenneth I. Joy Visualization and Graphics Research Group Department of Computer Science University of California, Davis A fundamental

More information

Number/Computation. addend Any number being added. digit Any one of the ten symbols: 0, 1, 2, 3, 4, 5, 6, 7, 8, or 9

Number/Computation. addend Any number being added. digit Any one of the ten symbols: 0, 1, 2, 3, 4, 5, 6, 7, 8, or 9 14 Number/Computation addend Any number being added algorithm A step-by-step method for computing array A picture that shows a number of items arranged in rows and columns to form a rectangle associative

More information

1 Attempt any three of the following: 1 5 a. What is Computer Graphics? How image is to be display on Video Display Device?

1 Attempt any three of the following: 1 5 a. What is Computer Graphics? How image is to be display on Video Display Device? (2½ hours) Total Marks: 75 N. B.: (1) All questions are compulsory. (2) Makesuitable assumptions wherever necessary and state the assumptions made. (3) Answers to the same question must be written together.

More information

Aston Hall s A-Z of mathematical terms

Aston Hall s A-Z of mathematical terms Aston Hall s A-Z of mathematical terms The following guide is a glossary of mathematical terms, covering the concepts children are taught in FS2, KS1 and KS2. This may be useful to clear up any homework

More information

Computer Graphics (CS 543) Lecture 10: Rasterization and Antialiasing

Computer Graphics (CS 543) Lecture 10: Rasterization and Antialiasing Computer Graphics (CS 543) Lecture 10: Rasterization and Antialiasing Prof Emmanuel Agu Computer Science Dept. Worcester Polytechnic Institute (WPI) Recall: Rasterization Rasterization (scan conversion)

More information

Selective Space Structures Manual

Selective Space Structures Manual Selective Space Structures Manual February 2017 CONTENTS 1 Contents 1 Overview and Concept 4 1.1 General Concept........................... 4 1.2 Modules................................ 6 2 The 3S Generator

More information

Computer Graphics : Bresenham Line Drawing Algorithm, Circle Drawing & Polygon Filling

Computer Graphics : Bresenham Line Drawing Algorithm, Circle Drawing & Polygon Filling Computer Graphics : Bresenham Line Drawing Algorithm, Circle Drawing & Polygon Filling Downloaded from :www.comp.dit.ie/bmacnamee/materials/graphics/006- Contents In today s lecture we ll have a loo at:

More information

Course Number: Course Title: Geometry

Course Number: Course Title: Geometry Course Number: 1206310 Course Title: Geometry RELATED GLOSSARY TERM DEFINITIONS (89) Altitude The perpendicular distance from the top of a geometric figure to its opposite side. Angle Two rays or two line

More information

Reflection and Refraction

Reflection and Refraction Reflection and Refraction Theory: Whenever a wave traveling in some medium encounters an interface or boundary with another medium either (or both) of the processes of (1) reflection and (2) refraction

More information

Attributes of Graphics Primitives

Attributes of Graphics Primitives ttributes for Graphics Output Primitives ttributes of Graphics Primitives in 2 points, lines polygons, circles, ellipses & other curves (also filled) characters in 3 triangles & other polygons anti-aliasing

More information

SAZ4C COMPUTER GRAPHICS. Unit : 1-5. SAZ4C Computer Graphics

SAZ4C COMPUTER GRAPHICS. Unit : 1-5. SAZ4C Computer Graphics SAZ4C COMPUTER GRAPHICS Unit : 1-5 1 UNIT :1 SYLLABUS Introduction to computer Graphics Video display devices Raster scan Systems Random Scan Systems Interactive input devices Hard copy devices Graphics

More information

4.5 VISIBLE SURFACE DETECTION METHODES

4.5 VISIBLE SURFACE DETECTION METHODES 4.5 VISIBLE SURFACE DETECTION METHODES A major consideration in the generation of realistic graphics displays is identifying those parts of a scene that are visible from a chosen viewing position. There

More information

VTU QUESTION PAPER SOLUTION UNIT -1 INTRODUCTION

VTU QUESTION PAPER SOLUTION UNIT -1 INTRODUCTION VTU QUESTION PAPER SOLUTION UNIT -1 INTRODUCTION 1. Briefly explain any two applications of computer graphics. (June 2012) 4M Ans: Applications of computer graphics are: Display Of Information Design Simulation

More information

CS602- Computer Graphics Solved MCQS From Midterm Papers. MIDTERM EXAMINATION Spring 2013 CS602- Computer Graphics

CS602- Computer Graphics Solved MCQS From Midterm Papers. MIDTERM EXAMINATION Spring 2013 CS602- Computer Graphics CS602- Computer Graphics Solved MCQS From Midterm Papers Dec 18,2013 MC100401285 Moaaz.pk@gmail.com Mc100401285@gmail.com PSMD01 Question No: 1 ( Marks: 1 ) - Please choose one DDA abbreviated for. Discrete

More information

SRM ARTS AND SCIENCE COLLEGE SRM NAGAR, KATTANKULATHUR

SRM ARTS AND SCIENCE COLLEGE SRM NAGAR, KATTANKULATHUR SRM ARTS AND SCIENCE COLLEGE SRM NAGAR, KATTANKULATHUR 603203 DEPARTMENT OF COMPUTER SCIENCE & APPLICATIONS QUESTION BANK (2017-2018) Course / Branch : BCA Semester / Year : IV / II Subject Name : Computer

More information

CMP 477 Computer Graphics Module 2: Graphics Systems Output and Input Devices. Dr. S.A. Arekete Redeemer s University, Ede

CMP 477 Computer Graphics Module 2: Graphics Systems Output and Input Devices. Dr. S.A. Arekete Redeemer s University, Ede CMP 477 Computer Graphics Module 2: Graphics Systems Output and Input Devices Dr. S.A. Arekete Redeemer s University, Ede Introduction The widespread recognition of the power and utility of computer graphics

More information

Glossary of dictionary terms in the AP geometry units

Glossary of dictionary terms in the AP geometry units Glossary of dictionary terms in the AP geometry units affine linear equation: an equation in which both sides are sums of terms that are either a number times y or a number times x or just a number [SlL2-D5]

More information

PARAMETRIC EQUATIONS AND POLAR COORDINATES

PARAMETRIC EQUATIONS AND POLAR COORDINATES 10 PARAMETRIC EQUATIONS AND POLAR COORDINATES PARAMETRIC EQUATIONS & POLAR COORDINATES A coordinate system represents a point in the plane by an ordered pair of numbers called coordinates. PARAMETRIC EQUATIONS

More information

I Internal Examination (Model Paper) B.Tech III Year VI semester, Computer Science & Engineering

I Internal Examination (Model Paper) B.Tech III Year VI semester, Computer Science & Engineering I Internal Examination 2017-18 (Model Paper) B.Tech III Year VI semester, Computer Science & Engineering Subject: 6CS4 Computer Graphics & Multimedia Technology Time: 1:30 Hr M.M:40 Question No. Question

More information

03 Vector Graphics. Multimedia Systems. 2D and 3D Graphics, Transformations

03 Vector Graphics. Multimedia Systems. 2D and 3D Graphics, Transformations Multimedia Systems 03 Vector Graphics 2D and 3D Graphics, Transformations Imran Ihsan Assistant Professor, Department of Computer Science Air University, Islamabad, Pakistan www.imranihsan.com Lectures

More information

CSC Computer Graphics

CSC Computer Graphics // CSC. Computer Graphics Lecture Kasun@dscs.sjp.ac.lk Department of Computer Science University of Sri Jayewardanepura Polygon Filling Scan-Line Polygon Fill Algorithm Span Flood-Fill Algorithm Inside-outside

More information

R asterisation. Part I: Simple Lines. Affine transformation. Transform Render. Rasterisation Line Rasterisation 2/16

R asterisation. Part I: Simple Lines. Affine transformation. Transform Render. Rasterisation Line Rasterisation 2/16 ECM2410:GraphicsandAnimation R asterisation Part I: Simple Lines Rasterisation 1/16 Rendering a scene User space Device space Affine transformation Compose Transform Render Com pose from primitives (lines,

More information

Chapter 1. Linear Equations and Straight Lines. 2 of 71. Copyright 2014, 2010, 2007 Pearson Education, Inc.

Chapter 1. Linear Equations and Straight Lines. 2 of 71. Copyright 2014, 2010, 2007 Pearson Education, Inc. Chapter 1 Linear Equations and Straight Lines 2 of 71 Outline 1.1 Coordinate Systems and Graphs 1.4 The Slope of a Straight Line 1.3 The Intersection Point of a Pair of Lines 1.2 Linear Inequalities 1.5

More information

Creating a Basic Chart in Excel 2007

Creating a Basic Chart in Excel 2007 Creating a Basic Chart in Excel 2007 A chart is a pictorial representation of the data you enter in a worksheet. Often, a chart can be a more descriptive way of representing your data. As a result, those

More information

Scan Conversion. CMP 477 Computer Graphics S. A. Arekete

Scan Conversion. CMP 477 Computer Graphics S. A. Arekete Scan Conversion CMP 477 Computer Graphics S. A. Areete What is Scan-Conversion? 2D or 3D objects in real world space are made up of graphic primitives such as points, lines, circles and filled polygons.

More information

The Traditional Graphics Pipeline

The Traditional Graphics Pipeline Final Projects Proposals due Thursday 4/8 Proposed project summary At least 3 related papers (read & summarized) Description of series of test cases Timeline & initial task assignment The Traditional Graphics

More information

The Traditional Graphics Pipeline

The Traditional Graphics Pipeline Last Time? The Traditional Graphics Pipeline Participating Media Measuring BRDFs 3D Digitizing & Scattering BSSRDFs Monte Carlo Simulation Dipole Approximation Today Ray Casting / Tracing Advantages? Ray

More information

Department of Computer Sciences Graphics Fall 2003 (Lecture 2) Pixels

Department of Computer Sciences Graphics Fall 2003 (Lecture 2) Pixels Pixels Pixel: Intensity or color sample. Raster Image: Rectangular grid of pixels. Rasterization: Conversion of a primitive s geometric representation into A set of pixels. An intensity or color for each

More information

Tutorial 1: Welded Frame - Problem Description

Tutorial 1: Welded Frame - Problem Description Tutorial 1: Welded Frame - Problem Description Introduction In this first tutorial, we will analyse a simple frame: firstly as a welded frame, and secondly as a pin jointed truss. In each case, we will

More information

Output Primitives Lecture: 4. Lecture 4

Output Primitives Lecture: 4. Lecture 4 Lecture 4 Circle Generating Algorithms Since the circle is a frequently used component in pictures and graphs, a procedure for generating either full circles or circular arcs is included in most graphics

More information

Announcements. Midterms graded back at the end of class Help session on Assignment 3 for last ~20 minutes of class. Computer Graphics

Announcements. Midterms graded back at the end of class Help session on Assignment 3 for last ~20 minutes of class. Computer Graphics Announcements Midterms graded back at the end of class Help session on Assignment 3 for last ~20 minutes of class 1 Scan Conversion Overview of Rendering Scan Conversion Drawing Lines Drawing Polygons

More information

Topics and things to know about them:

Topics and things to know about them: Practice Final CMSC 427 Distributed Tuesday, December 11, 2007 Review Session, Monday, December 17, 5:00pm, 4424 AV Williams Final: 10:30 AM Wednesday, December 19, 2007 General Guidelines: The final will

More information

Display Technologies: CRTs Raster Displays

Display Technologies: CRTs Raster Displays Rasterization Display Technologies: CRTs Raster Displays Raster: A rectangular array of points or dots Pixel: One dot or picture element of the raster Scanline: A row of pixels Rasterize: find the set

More information

Interactive Math Glossary Terms and Definitions

Interactive Math Glossary Terms and Definitions Terms and Definitions Absolute Value the magnitude of a number, or the distance from 0 on a real number line Addend any number or quantity being added addend + addend = sum Additive Property of Area the

More information

3D Modeling and Design Glossary - Beginner

3D Modeling and Design Glossary - Beginner 3D Modeling and Design Glossary - Beginner Align: to place or arrange (things) in a straight line. To use the Align tool, select at least two objects by Shift left-clicking on them or by dragging a box

More information

The Traditional Graphics Pipeline

The Traditional Graphics Pipeline Last Time? The Traditional Graphics Pipeline Reading for Today A Practical Model for Subsurface Light Transport, Jensen, Marschner, Levoy, & Hanrahan, SIGGRAPH 2001 Participating Media Measuring BRDFs

More information

Computer Graphics - Chapter 1 Graphics Systems and Models

Computer Graphics - Chapter 1 Graphics Systems and Models Computer Graphics - Chapter 1 Graphics Systems and Models Objectives are to learn about: Applications of Computer Graphics Graphics Systems Images: Physical and Synthetic The Human Visual System The Pinhole

More information

Representing 2D Transformations as Matrices

Representing 2D Transformations as Matrices Representing 2D Transformations as Matrices John E. Howland Department of Computer Science Trinity University One Trinity Place San Antonio, Texas 78212-7200 Voice: (210) 999-7364 Fax: (210) 999-7477 E-mail:

More information

EF432. Introduction to spagetti and meatballs

EF432. Introduction to spagetti and meatballs EF432 Introduction to spagetti and meatballs CSC 418/2504: Computer Graphics Course web site (includes course information sheet): http://www.dgp.toronto.edu/~karan/courses/418/ Instructors: L2501, T 6-8pm

More information

CS 4731: Computer Graphics Lecture 21: Raster Graphics: Drawing Lines. Emmanuel Agu

CS 4731: Computer Graphics Lecture 21: Raster Graphics: Drawing Lines. Emmanuel Agu CS 4731: Computer Graphics Lecture 21: Raster Graphics: Drawing Lines Emmanuel Agu 2D Graphics Pipeline Clipping Object World Coordinates Applying world window Object subset window to viewport mapping

More information