I Internal Examination (Model Paper) B.Tech III Year VI semester, Computer Science & Engineering
|
|
- Candace Andrews
- 6 years ago
- Views:
Transcription
1 I Internal Examination (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 Marks CO Mapped Q.1(a) Solution Q.1(b) Solution Unit-1 In a raster system with resolution 2048*1280. Calculate the number of pixels could be accessed per second by a display controller that refreshes at rate of 50 frames per second. Also calculate the access time per pixel in the system. Resolution : 2048 * 1280 = Since controller can access 50 frames in one second Therefore, total no. of pixels accessed = 50 * = per sec Access time / Pixel = 1 / total pixels accessed per sec = 1 / = 7.62 * e-9 per sec Explain DDA s line drawing algorithm. A line connects two points. It is a basic element in graphics. To draw a line, you need two points between which you can draw a line. In the following three algorithms, we refer the one point of line as X0,Y0 and the second point of line as X1,Y1. DDA Algorithm Digital Differential Analyzer (DDA) algorithm is the simple line generation algorithm which is explained step by step here. Step 1 Get the input of two end points (X0,Y0) and (X1,Y1). Step 2 Calculate the difference between two end points. dx = X1 - X0 dy = Y1 - Y0 Step 3 Based on the calculated difference in step-2, you need to identify the number of steps to put pixel. If dx > dy, then you need more steps in x coordinate; otherwise in y coordinate. 06 CO CO364.1 if (absolute(dx) > absolute(dy)) Steps = absolute(dx); else Steps = absolute(dy); Step 4 Calculate the increment in x coordinate and y coordinate. Xincrement = dx / (float) steps;
2 Yincrement = dy / (float) steps; Step 5 Put the pixel by successfully incrementing x and y coordinates accordingly and complete the drawing of the line. Q.1(a) Solution for(int v=0; v < Steps; v++) { } x = x + Xincrement; y = y + Yincrement; putpixel(round(x), Round(y)); OR Part Discuss anti aliasing briefly. Explain various methods used to develop anti-aliasing routines. Aliasing: 1. A problem with high resolution texturing is aliasing, which occurs when adjacent pixels in a rendered image are sampled from pixels that are far apart in a texture image. 2. By down-sampling reducing the size of a texture aliasing can be reduced for far away or small objects, but then textured objects look blurry when close to the viewer. 3. What we really want is a high resolution texture for nearby viewing, and downsampled textures for distant viewing. 4. A technique called mip-mapping gives us this by pre-rendering a texture image at several different scales. 5. For example, a image might be down-sampled to , 64 64, 32 32, 16 16, and so on. 6. Then it is up to the renderer to select the correct mipmap to reduce aliasing artifacts at the scale of the rendered texture. 06 CO An aliased high resolution texture image (left) and the same texture after mipmapping (right). Anti-aliasing:
3 Drawing a circle on the screen is a little complex than drawing a line. There are two 1. Antialiasing is a term for techniques that are designed to mitigate the effects of aliasing. 2. The idea is that when a pixel is only partially covered by a shape, the color of the pixel should bea mixture of the color of the shape and the color of the background. 3. When drawing a black lineon a white background, the color of a partially covered pixel would be gray, with the shade ofgray depending on the fraction of the pixel that is covered by the line. 4. Here, for example, is a geometric line, shown on the left, along with two approximations of thatline made by coloring pixels. The lines are greatly magnified so that you can see the individualpixels. 5. The line on the right is drawn using antialiasing, while the one in the middle is not: 1. Note that antialiasing does not give a perfect image, but it can reduce the jaggies that are caused by aliasing. Methods of Anti-aliasing: Basically, there are only three main methods of anti-aliasing: Super-sampling Multisampling Post-Processing Post-Processing Postfiltering, also known as super sampling is the more popular approach to antialiasing. For each displayed pixel, a postfiltering method takes several samples from the scene and computes an average of the samples to determine the pixel's color. The two steps in the postfiltering process are: o Sample the scene at n times the display resolution. For example, suppose the display resolution is Sampling at three times the width and three times the height of the display resolution would yield samples. The color of each pixel in the rendered image will be an average of several samples. For example, if sampling were performed at three times the width and three times the height of the display resolution, then a pixel's color would be an average of nine samples. A filter provides the weights used to compute the average. Q.1(b) Write Mid Point Circle drawing algorithm and show how it draws a circle whose radius is 4 and centred at origin. 10 CO364.1
4 Solution popular algorithms for generating a circle Bresenham s Algorithmand Midpoint Circle Algorithm. These algorithms are based on the idea of determining the subsequent points required to draw the circle. Let us discuss the algorithms in detail The equation of circle is X2+Y2=r2, where r is radius. Mid Point Algorithm Step 1 Input radius r and circle center (xc,yc)(xc,yc) and obtain the first point on the circumference of the circle centered on the origin as (x0, y0) = (0, r) Step 2 Calculate the initial value of decision parameter as P0P0 = 5/4 r (See the following description for simplification of this equation.) f(x, y) = x2 + y2 - r2 = 0 f(xi - 1/2 + e, yi + 1) = (xi - 1/2 + e)2 + (yi + 1)2 - r2 = (xi- 1/2)2 + (yi + 1)2 - r2 + 2(xi - 1/2)e + e2 = f(xi - 1/2, yi + 1) + 2(xi - 1/2)e + e2 = 0
5 Let di = f(xi - 1/2, yi + 1) = -2(xi - 1/2)e - e2 Thus, If e < 0 then di > 0 so choose point S = (xi - 1, yi + 1). di+1 = f(xi - 1-1/2, yi ) = ((xi - 1/2) - 1)2 + ((yi + 1) + 1)2 - r2 = di - 2(xi - 1) + 2(yi + 1) + 1 = di + 2(yi xi + 1) + 1 If e >= 0 then di <= 0 so choose point T = (xi, yi + 1) di+1 = f(xi - 1/2, yi ) = di + 2yi The initial value of di is d0 = f(r - 1/2, 0 + 1) = (r - 1/2) r2 = 5/4 - r {1-r can be used if r is an integer}
6 When point S = (xi - 1, yi + 1) is chosen then di+1 = di + -2xi+1 + 2yi When point T = (xi, yi + 1) is chosen then di+1 = di + 2yi Step 3 At each XKXK position starting at K=0, perform the following test If PK < 0 then next point on circle (0,0) is (XK+1,YK) and PK+1 = PK + 2XK Else PK+1 = PK + 2XK YK+1 Where, 2XK+1 = 2XK+2 and 2YK+1 = 2YK-2. Step 4 Determine the symmetry points in other seven octants. Step 5 Move each calculate pixel position (X, Y) onto the circular path centered on (XC,YC)(XC,YC) and plot the coordinate values. X = X + XC, Y = Y + YC Step 6 Repeat step-3 through 5 until X >= Y. Draw a circle whose radius is 4 and centred at origin Solution: r = 4 The initial point (x, y) = (0,4) Calculate the initial decision parameters p = = -3 P = -3 < 0 First Plot (0,4) Here p<0 so X = 0+1 =1 Y = 4 P = p+2x+1 = -3+2*1+1 = =0 x<y i.e., 1<4 & p>=0 So plot (1,4) x = 1+1 =2 y = 4-1 = 3 p = p + 2x-2y+1 = 0 + 2*2-2*3+1= = -1 x<y and p<0 so plot (2,3)
7 x = 2+1=3 y=3 p = -1+2*3+1 = 6 Plot(3,3) Unit-2 Q.2 Solution Explain basic principle to draw a eclipse. Also explain mid-point eclipse algorithm. An ellipse is a set of points such that the sum of the distances from two fixed positions (foci) is the same for all points.if the distances to any two foci from any point P=(x,y) on the ellipse are labeled d1 and d2 then the general equation of an an ellipse can be stated as d1 + d2 is constant. An ellipse in standard position is symmetric between quadrants. But it not symmetric between the two octants of the quadrant. So, we must calculate the pixel positions along the elliptical arc throughout one quadrant, then we obtained positions in the remaining three quadrants by symmetry. Midpoint Ellipse Algorithm In Mathematical term, d1 + d2 = constant For an ellipse with center point (h,k), the standard rectangular expression can be written as { (x-h)/a }2 + { (y-k)/b }2 = 1 So, lets assume a ellipse with center at origin ((h,k)= (0,0)), having major and minor axis a and b respectively, By putting all this value in above equation, we get (x/a)2 + (y/b)2 = 1 On solving: (x/a)2 + (y/b)2-1 = 0 In first region, the equation will be: f(x, y) = a2x2 + b2y2 - a2b2 The mid points will be F(Xmid, Ymid) = (Xk+1, Yk 1/2) having following properties: F(Xmid, Ymid) < 0, when midpoints will lie inside the ellipse boundary. F(Xmid, Ymid) = 0, when midpoints will lie on ellipse boundary. F(Xmid, Ymid) > 0, when midpoints will lie outside the ellipse boundary. Now, put this midpoints value in first region equation: F(Xmid, Ymid) = b2(xk+1)2 + a2(yk - 1/2)2 a2b2 16 CO364.1
8 On solving: P k = b2(xk+1)2 + a2(yk2 + ¼ - Yk) a2b2 P k = b2(xk Xk) + a2(yk2 + ¼ -Yk) a2b2 and P k+1 = b2(xk Xk+1) + a2(yk+12 + ¼ -Yk+1) a2b2 Initial decision parameter of Region-1 is (0, b), hence putting this value in above equation: P o=b2(0+1+0) + a2(b2 + ¼ -b) a2b2 P o = b2 + a2b2 + a2/4 a2b a2b2 P o= b2 + a2/4 a2b P o= a2/4 a2b + b2 This is the initial decision parameter of region 1. Now, substracting P'k from P'k+1 P k+1 P k = b2(xk+12 X2k) +2b2(Xk+1-Xk) + a2(yk+12 Yk2) + a2(yk+1 - Yk) P k+1 P k = b2(xk+1 Xk)(Xk+1 + Xk) +2b2(Xk+1-Xk) + a2(yk+1 Yk)(Yk+1 + Yk) -a2(yk+1 - Yk) If P is negative: Xk+1 Xk = 1 Yk+1 Yk = 0 hence P k+1 = P k + 2b2 Xk+1 + b2 This is the decision parameter for less than zero of region 1. If P is positive: Xk+1 Xk = 1 Yk+1 Yk = -1 hence P k+1 = P k +b2(xk+1 + Xk) + 2b2 + a2(-1)(yk+1 + Yk) a2(-1) P k+1 = P k + 2b2 Xk+1 + b2 2a2 Yk+1 This is the decision parameter for greater than zero of region 1 Over Region R2 Now lets solve the derivation for region 2 F(X,Y) = b2x2 + a2y2 a2b2 F(Xmid, Ymid) = (Xk+1/2, Yk 1) F(Xmid, Ymid) = b2(xk + 1/2)2 + a2(yk - 1)2 a2b2
9 hence P k = b2(xk + 1/2)2 + a2(yk - 1)2 a2b2 P k = b2(x2k + 1/4 + Xk) + a2(y2k + 1-2Yk) a2b2 P k+1 = b2(xk /4 + Xk+1) + a2(yk Yk+1) a2b2 Initial decision parameter of Region R2 (X0, Y0): P 0 = b2(x0 + 1/2)2 + a2( Y0-1)2 a2b2 This is the initial decision parameter of region R2. Now, substracting P'k from P'k+1: P k+1 P k = b2(x2k+1 Xk2) +b2(xk+1 - Xk) + a2(yk+12 Y2k) -2a2(Yk+1 - Yk) P k+1 P k = b2(xk+1 Xk)(Xk+1 + Xk) +b2(xk+1-xk) + a2(yk+1 Yk)(Yk+1 + Yk) - 2a2(Yk+1 - Yk) If P is positive: Xk+1 Xk = 0 Yk+1 Yk = -1 Hence P k+1 = P k 2a2 Yk+1 + a2 This is the decision parameter for greater than zero of region 2. If P is negative: Xk+1 Xk = 1 Yk+1 Yk = -1 Hence P k+1 = P k + 2b2 Xk+1-2a2 Yk+1 + a2 This is the decision parameter for less than zero of region 2. Algorithm 1.Input rx,ry and ellipse center (xc,yc) and obtain the first point on an ellipse centered on the origin as (x0,y0)=(0,ry) 2.Calculate the initial value of the decision parameter in region 1 as p10 = r2y-r2xry + ¼ r2x 3.At each xk position in region 1,starting at k=0,perform the following test if p1k<0, the next point along the ellipse centered on (0,0)is (xk+1,yk) otherwise the next point along the circle is (xk+1,yk-1) and p1k+1 = p1k + 2r2yxk+1 2r2yxk+1 + r2y with 2r2yxk+1 = 2r2yxk + 2r2y 2r2xyk-2r2xyk 2r2x
10 Q.2(a) 4.Calculate the initial value of the decision parameter in region 2 using the last point (x0,y0) calculated in region as p20 = r2y (x0+1/2)2 + r2x(y0-1)2-r2xr2y 5.At each yk position in region2 starting at k=0,perform the following test if p2k>0 the next point along the ellipse centered on (0,0) is (xk,yk-1) and p2k+1=p2k-2r2xyk+1 + r2x otherwise the next point along the circle is (xk+1,yk-1) and p2k+1 = p2k + 2r2yxk+1 2r2xyk+1 +r2x using the same incremental calculations for x and y as in region1 6.Determine symmetry points in the other three quadrants. 7.Move each calculated pixel position (x,y) onto the elliptical path centered on (xc,yc) and plot the coordinate values. X=x+xc,y=y+yc 8.Repeat the steps for region1 until 2r2yx > = 2r2xy OR Part Explain the need of homogeneous coordinate? Prove that two successive scaling are multiplicative. 08 CO364.2 Solution 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, Rotate the translated coordinates, and then Scale the rotated coordinates to complete the composite transformation. To shorten this process, we have to use 3 3 transformation matrix instead of 2 2 transformation matrix. To convert a 2 2 matrix to 3 3 matrix, we have to add an extra dummy coordinate W. 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. Any Cartesian point P(X, Y) can be converted to homogenous coordinates by P (Xh, Yh, h). Composite Transformation If a transformation of the plane T1 is followed by a second plane transformation T2, then the result itself may be represented by a single transformation T which is the composition of T1 and T2 taken in that order. This is written as T = T1 T2. Composite transformation can be achieved by concatenation of transformation matrices to obtain a combined transformation matrix.
11 A combined matrix [T][X] = [X] [T1] [T2] [T3] [T4]. [Tn] Where [Ti] is any combination of Translation Scaling Shearing Rotation Reflection The change in the order of transformation would lead to different results, as in general matrix multiplication is not cumulative, that is [A]. [B] [B]. [A] and the order of multiplication. 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. Translations Finally, translate the center of rotation back where it belonged. Two successive translations of an object can be carried out by first concatenating the translations matrices, then applying the composite matrix to the coordinate points. Specifying the two successive translation distances as (Tx1, Ty1) and (Tx2, Ty2), we calculate the composite matrix as Which demonstrates that two successive translations are additive. Scalings Concatenating transformation matrices for two successive scaling operations produces the following composite scaling matrix: S(Sx1, Sy1). S(Sx2, Sy2) = S(Sx1.Sx2, Sy1.Sy2) The resulting matrix in this case indicates that successive scaling operations are multiplicative. That is, if we were to triple the size of an object twice in succession, the final size would be nine times that of the original. Rotations The composite matrix for two successive rotations is calculated as
12 R(θ1). R(θ2) = R(θ1 + θ2) Using the trigonometric identities for the sine and cosine of the sum of two angles, we can express the elements of the product matrix for two successive rotations in the xy plane about the coordinate origin as Q.2(b) As is the case with translations, successive rotations are additive. Translate a square ABCD with the coordinated A(0,0), B(3,0), C(3,3,), D(0,3) by 2 units in both directions and then scale it by 1.5 units in X-direction and 0.5 Units in Y direction. 08 CO364.2 Solution
13 Q.3 Solution Unit-3 Differentiate 4-Connected area filling approach from 8-Connected approach. 4-Connected Polygon In this technique 4-connected pixels are used as shown in the figure. 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. 08 CO364.2 Algorithm Step 1 Initialize the value of seed point (seedx, seedy), fcolor and bcol. Step 2 Define the boundary values of the polygon. Step 3 Check if the current seed point is of default color, then repeat the steps 4 and 5 till the boundary pixels reached. If getpixel(x, y)!= bcol && getpixel(x, y)!= fcolor then repeat step 4 and 5 Step 4 Change the default color with the fill color at the seed point.
14 setpixel(seedx, seedy, fcol) Step 5 Recursively follow the procedure with four neighborhood points. BoundaryFill (seedx 1, seedy, fcol, dcol) BoundaryFill (seedx + 1, seedy, fcol, dcol) BoundaryFill (seedx, seedy - 1, fcol, dcol) BoundaryFill (seedx 1, seedy + 1, fcol, dcol) Step 6 Exit 8-Connected Polygon In this technique 8-connected pixels are used as shown in the figure. 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. Algorithm Step 1 Initialize the value of seed point (seedx, seedy), fcolor and bcol. Step 2 Define the boundary values of the polygon. Step 3 Check if the current seed point is of default color then repeat the steps 4 and 5 till the boundary pixels reached If getpixel(x, y)!= bcol && getpixel(x, y)!= fcolor then repeat step 4 and 5 Step 4 Change the default color with the fill color at the seed point. setpixel(seedx, seedy, fcol) Step 5 Recursively follow the procedure with four neighbourhood points BoundaryFill (seedx 1, seedy, fcol, dcol) BoundaryFill (seedx + 1, seedy, fcol, dcol) BoundaryFill (seedx, seedy - 1, fcol, dcol) BoundaryFill (seedx, seedy + 1, fcol, dcol) BoundaryFill (seedx 1, seedy + 1, fcol, dcol) BoundaryFill (seedx + 1, seedy + 1, fcol, dcol) BoundaryFill (seedx + 1, seedy - 1, fcol, dcol) BoundaryFill (seedx 1, seedy - 1, fcol, dcol) Step 6 Exit
15 OR Part Q.3 Write a short note on: (A)Aliasing & Flickers in display processor (B) Shearing 08 CO364.2 Solution (A)Aliasing & Flickers in display processor Aliasing: 1. A problem with high resolution texturing is aliasing, which occurs when adjacent pixels in a rendered image are sampled from pixels that are far apart in a texture image. 2. By down-sampling reducing the size of a texture aliasing can be reduced for far away or small objects, but then textured objects look blurry when close to the viewer. 3. What we really want is a high resolution texture for nearby viewing, and downsampled textures for distant viewing. 4. A technique called mip-mapping gives us this by pre-rendering a texture image at several different scales. 5. For example, a image might be down-sampled to , 64 64, 32 32, 16 16, and so on. 6. Then it is up to the renderer to select the correct mipmap to reduce aliasing artifacts at the scale of the rendered texture. An aliased high resolution texture image (left) and the same texture after mipmapping (right). Flickers in display processor The phenomenon whereby a display screen appears to flicker. Screen flicker results from a variety of factors, the most important of which is the monitor's refresh rate, the speed with which the screen is redrawn. If the refresh rate is too slow, the screen will appear to glimmer. Another factor that affects screen flicker is the persistence of the screen phosphors. Low-persistence phosphors fade more quickly than high-persistence monitors, making screen flicker more likely. Screen flicker can also be affected by lighting. Finally, screen flicker is a subjective perception that affects people differently. Some people perceive screen flicker where others do not.
16 (B) Shearing A transformation that slants the shape of an object is called the shear transformation. 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 transformation matrix for X-Shear can be represented as X' = X + Shx. Y Y = Y Y-Shear The Y-Shear preserves the X coordinates and changes the Y coordinates which causes the horizontal lines to transform into lines which slopes up or down as shown in the following figure.
17 The Y-Shear can be represented in matrix from as Y = Y + Shy. X X = X
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 informationOpenGL 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 informationAbout 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 informationAdvantages: 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 informationIn 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 informationComputer 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 informationOutput 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 informationUNIT 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 informationCS 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 informationAbout 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 informationLab Manual. Computer Graphics. T.E. Computer. (Sem VI)
Lab Manual Computer Graphics T.E. Computer (Sem VI) Index Sr. No. Title of Programming Assignments Page No. 1. Line Drawing Algorithms 3 2. Circle Drawing Algorithms 6 3. Ellipse Drawing Algorithms 8 4.
More informationCS 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 informationMET71 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 informationFrom Ver(ces to Fragments: Rasteriza(on
From Ver(ces to Fragments: Rasteriza(on From Ver(ces to Fragments 3D vertices vertex shader rasterizer fragment shader final pixels 2D screen fragments l determine fragments to be covered l interpolate
More informationMODULE - 4. e-pg Pathshala
e-pg Pathshala MODULE - 4 Subject : Computer Science Paper: Computer Graphics and Visualization Module: Midpoint Circle Drawing Procedure Module No: CS/CGV/4 Quadrant 1 e-text Before going into the Midpoint
More information1.1 Survey of Computer graphics Computer graphics is the pictorial representation of information using a computer program.
UNIT I INTRODUCTION Survey of computer graphics, Overview of graphics systems Video display devices, Raster scan systems, Random scan systems, Graphics monitors and Workstations, Input devices, Hard copy
More informationPOLYGON FILLING ALGORITHM
POLYGON FILLING ALGORITHM http://www.tutorialspoint.com/computer_graphics/polygon_filling_algorithm.htm Copyright tutorialspoint.com Polygon is an ordered list of vertices as shown in the following figure.
More informationPart 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 informationCS602 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 informationTópicos de Computação Gráfica Topics in Computer Graphics 10509: Doutoramento em Engenharia Informática. Chap. 2 Rasterization.
Tópicos de Computação Gráfica Topics in Computer Graphics 10509: Doutoramento em Engenharia Informática Chap. 2 Rasterization Rasterization Outline : Raster display technology. Basic concepts: pixel, resolution,
More informationGraphics (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 informationComputer Science 426 Midterm 3/11/04, 1:30PM-2:50PM
NAME: Login name: Computer Science 46 Midterm 3//4, :3PM-:5PM This test is 5 questions, of equal weight. Do all of your work on these pages (use the back for scratch space), giving the answer in the space
More informationEfficient Plotting Algorithm
Efficient Plotting Algorithm Sushant Ipte 1, Riddhi Agarwal 1, Murtuza Barodawala 1, Ravindra Gupta 1, Prof. Shiburaj Pappu 1 Computer Department, Rizvi College of Engineering, Mumbai, Maharashtra, India
More informationEinfü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 informationCS 450: COMPUTER GRAPHICS REVIEW: DRAWING LINES AND CIRCLES SPRING 2015 DR. MICHAEL J. REALE
CS 450: COMPUTER GRAPHICS REVIEW: DRAWING LINES AND CIRCLES SPRING 2015 DR. MICHAEL J. REALE DRAWING PRIMITIVES: LEGACY VS. NEW Legacy: specify primitive in glbegin() glbegin(gl_points); glvertex3f(1,5,0);
More informationUnit 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 informationDepartment 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 informationOverview 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 informationUNIT -8 IMPLEMENTATION
UNIT -8 IMPLEMENTATION 1. Discuss the Bresenham s rasterization algorithm. How is it advantageous when compared to other existing methods? Describe. (Jun2012) 10M Ans: Consider drawing a line on a raster
More informationRasterization: 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 informationChapter 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 informationUNIT 2 Scan Conversion Techniques and Image Representation Unit-02/Lecture-01
UNIT 2 Scan Conversion Techniques and Image Representation Unit-02/Lecture-01 Scan Conversion [RGPV/DEC-2008(10)] Scan conversion or scan rate converting is a technique for changing the vertical / horizontal
More information(Refer Slide Time: 00:03:51)
Computer Graphics Prof. Sukhendu Das Dept. of Computer Science and Engineering Indian Institute of Technology, Madras Lecture 17 Scan Converting Lines, Circles and Ellipses Hello and welcome everybody
More informationChapter - 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 informationDepartment of Computer Science Engineering, Mits - Jadan, Pali, Rajasthan, India
International Journal of Scientific Research in Computer Science, Engineering and Information Technology 2018 IJSRCSEIT Volume 3 Issue 1 ISSN : 2456-3307 Performance Analysis of OpenGL Java Bindings with
More informationCPSC / Scan Conversion
CPSC 599.64 / 601.64 Computer Screens: Raster Displays pixel rasters (usually) square pixels in rectangular raster evenly cover the image problem no such things such as lines, circles, etc. scan conversion
More informationScan Converting Circles
Scan Conversion Algorithms CS 460 Computer Graphics Professor Richard Eckert Circles Ellipses and Other 2-D Curves Text February 16, 2004 Scan Converting Circles Given: Center: (h,k) Radius: r Equation:
More information0. 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 informationComputer 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 informationGRAPHICS OUTPUT PRIMITIVES
CHAPTER 3 GRAPHICS OUTPUT PRIMITIVES LINE DRAWING ALGORITHMS DDA Line Algorithm Bresenham Line Algorithm Midpoint Circle Algorithm Midpoint Ellipse Algorithm CG - Chapter-3 LINE DRAWING Line drawing is
More informationUNIT 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 informationCOMP30019 Graphics and Interaction Transformation geometry and homogeneous coordinates
COMP30019 Graphics and Interaction Transformation geometry and homogeneous coordinates Department of Computer Science and Software Engineering The Lecture outline Introduction Vectors and matrices Translation
More informationComputer 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 informationInstitutionen för systemteknik
Code: Day: Lokal: M7002E 19 March E1026 Institutionen för systemteknik Examination in: M7002E, Computer Graphics and Virtual Environments Number of sections: 7 Max. score: 100 (normally 60 is required
More informationComputer 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 informationCOMP371 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 informationGraphics and Interaction Transformation geometry and homogeneous coordinates
433-324 Graphics and Interaction Transformation geometry and homogeneous coordinates Department of Computer Science and Software Engineering The Lecture outline Introduction Vectors and matrices Translation
More information? Which intermediate. Recall: Line drawing algorithm. Programmer specifies (x,y) of end pixels Need algorithm to determine pixels on line path
Recall: Line drawing algorithm Programmer specifies (x,y) of end pixels Need algorithm to determine pixels on line path 8 7 6 5 4 3 2 1 (3,2) (9,6) Line: (3,2) -> (9,6)? Which intermediate pixels to turn
More informationLine Drawing. Foundations of Computer Graphics Torsten Möller
Line Drawing Foundations of Computer Graphics Torsten Möller Rendering Pipeline Hardware Modelling Transform Visibility Illumination + Shading Perception, Interaction Color Texture/ Realism Reading Angel
More informationEF432. 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 informationCS2401 Computer Graphics
UNIT I - 2D PRIMITIVES Output primitives Line, Circle and Ellipse drawing algorithms - Attributes of output primitives Two dimensional Geometric transformation - Two dimensional viewing Line, Polygon,
More informationScan 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 informationCSCI 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 informationRendering. Basic Math Review. Rasterizing Lines and Polygons Hidden Surface Remove Multi-pass Rendering with Accumulation Buffers.
Rendering Rasterizing Lines and Polygons Hidden Surface Remove Multi-pass Rendering with Accumulation Buffers Basic Math Review Slope-Intercept Formula For Lines Given a third point on the line: P = (X,Y)
More informationRendering. A simple X program to illustrate rendering
Rendering A simple X program to illustrate rendering The programs in this directory provide a simple x based application for us to develop some graphics routines. Please notice the following: All points
More informationUNIT 5: Transformations
Period: Date: May 11 & 12, 2015 UNIT 5: Transformations Checklist MAX Scored 1 Vocabulary 40 2 Transformations 30 3 Constructions 20 4 Random Transformations 30 Totals 120 Semester 2 Test Prep Section
More information2D 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 informationSolution Notes. COMP 151: Terms Test
Family Name:.............................. Other Names:............................. ID Number:............................... Signature.................................. Solution Notes COMP 151: Terms
More informationComputer 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 informationR 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 informationLecture 5 2D Transformation
Lecture 5 2D Transformation What is a transformation? In computer graphics an object can be transformed according to position, orientation and size. Exactly what it says - an operation that transforms
More informationOutput 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 informationOutput Primitives. Dr. S.M. Malaek. Assistant: M. Younesi
Output Primitives Dr. S.M. Malaek Assistant: M. Younesi Output Primitives Output Primitives: Basic geometric structures (points, straight line segment, circles and other conic sections, quadric surfaces,
More informationLine Drawing. Introduction to Computer Graphics Torsten Möller / Mike Phillips. Machiraju/Zhang/Möller
Line Drawing Introduction to Computer Graphics Torsten Möller / Mike Phillips Rendering Pipeline Hardware Modelling Transform Visibility Illumination + Shading Perception, Color Interaction Texture/ Realism
More informationCS2401 Computer Graphics
CS24 Computer Graphics UNIT I - 2D PRIMITIVES Output primitives Line, Circle and Ellipse drawing algorithms - Attributes of output primitives Two dimensional Geometric transformation - Two dimensional
More informationEF432. 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 informationMultivariable Calculus
Multivariable Calculus Chapter 10 Topics in Analytic Geometry (Optional) 1. Inclination of a line p. 5. Circles p. 4 9. Determining Conic Type p. 13. Angle between lines p. 6. Parabolas p. 5 10. Rotation
More informationSurface shading: lights and rasterization. Computer Graphics CSE 167 Lecture 6
Surface shading: lights and rasterization Computer Graphics CSE 167 Lecture 6 CSE 167: Computer Graphics Surface shading Materials Lights Rasterization 2 Scene data Rendering pipeline Modeling and viewing
More informationUNIT I - 2D PRIMITIVES
UNIT I - 2D PRIMITIVES Output primitives Line, Circle and Ellipse drawing algorithms - Attributes of output primitives Two dimensional Geometric transformation - Two dimensional viewing Line, Polygon,
More informationAQA 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 informationRenderer Implementation: Basics and Clipping. Overview. Preliminaries. David Carr Virtual Environments, Fundamentals Spring 2005
INSTITUTIONEN FÖR SYSTEMTEKNIK LULEÅ TEKNISKA UNIVERSITET Renderer Implementation: Basics and Clipping David Carr Virtual Environments, Fundamentals Spring 2005 Feb-28-05 SMM009, Basics and Clipping 1
More informationCS 130. Scan Conversion. Raster Graphics
CS 130 Scan Conversion Raster Graphics 2 1 Image Formation Computer graphics forms images, generally two dimensional, using processes analogous to physical imaging systems like: - Cameras - Human visual
More informationChapter 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 informationWrite 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 informationIntroduction. LP 1: Line Drawing algorithm Slope-intersept equation for a straight line is
Introduction Def 1: The creation, storage and manipulation of images and drawings using a digital computer is called computer graphics. Def 2: Computer graphics are graphics created using computers and
More informationLast week. Machiraju/Zhang/Möller/Fuhrmann
Last week Machiraju/Zhang/Möller/Fuhrmann 1 Geometry basics Scalar, point, and vector Vector space and affine space Basic point and vector operations Sided-ness test Lines, planes, and triangles Linear
More informationSection III: TRANSFORMATIONS
Section III: TRANSFORMATIONS in 2-D 2D TRANSFORMATIONS AND MATRICES Representation of Points: 2 x 1 matrix: X Y General Problem: [B] = [T] [A] [T] represents a generic operator to be applied to the points
More informationThe graphics pipeline. Pipeline and Rasterization. Primitives. Pipeline
The graphics pipeline Pipeline and Rasterization CS4620 Lecture 9 The standard approach to object-order graphics Many versions exist software, e.g. Pixar s REYES architecture many options for quality and
More informationTopic 0. Introduction: What Is Computer Graphics? CSC 418/2504: Computer Graphics EF432. Today s Topics. What is Computer Graphics?
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: L0101, W 12-2pm
More informationCS602 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 informationPARAMETRIC 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 informationComputer Graphics: Geometric Transformations
Computer Graphics: Geometric Transformations Geometric 2D transformations By: A. H. Abdul Hafez Abdul.hafez@hku.edu.tr, 1 Outlines 1. Basic 2D transformations 2. Matrix Representation of 2D transformations
More informationRasteriza2on and Clipping
Overview Scan conversion Computer Graphics Rasterizaon and Clipping Polygon filling Clipping in D Aleksandra Pizurica Raster Display PIEL (picture element) RASTER (a rectangular array of points or dots)
More informationFrom Vertices to Fragments: Rasterization. Reading Assignment: Chapter 7. Special memory where pixel colors are stored.
From Vertices to Fragments: Rasterization Reading Assignment: Chapter 7 Frame Buffer Special memory where pixel colors are stored. System Bus CPU Main Memory Graphics Card -- Graphics Processing Unit (GPU)
More informationRasterization. CS 4620 Lecture Kavita Bala w/ prior instructor Steve Marschner. Cornell CS4620 Fall 2015 Lecture 16
Rasterization CS 4620 Lecture 16 1 Announcements A3 due on Thu Will send mail about grading once finalized 2 Pipeline overview you are here APPLICATION COMMAND STREAM 3D transformations; shading VERTEX
More informationCS 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(a) rotating 45 0 about the origin and then translating in the direction of vector I by 4 units and (b) translating and then rotation.
Code No: R05221201 Set No. 1 1. (a) List and explain the applications of Computer Graphics. (b) With a neat cross- sectional view explain the functioning of CRT devices. 2. (a) Write the modified version
More informationIntroduction to Computer Graphics
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
More informationRasterization, 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 informationIntroduction to Computer Graphics (CS602) Lecture 05 Line Drawing Techniques
Introduction to Computer Graphics (CS602) Lecture 05 Line Drawing Techniques 5.1 Line A line, or straight line, is, roughly speaking, an (infinitely) thin, (infinitely) long, straight geometrical object,
More informationChapter 2: Transformations. Chapter 2 Transformations Page 1
Chapter 2: Transformations Chapter 2 Transformations Page 1 Unit 2: Vocabulary 1) transformation 2) pre-image 3) image 4) map(ping) 5) rigid motion (isometry) 6) orientation 7) line reflection 8) line
More informationInteractive Computer Graphics. Hearn & Baker, chapter D transforms Hearn & Baker, chapter 5. Aliasing and Anti-Aliasing
Interactive Computer Graphics Aliasing and Anti-Aliasing Hearn & Baker, chapter 4-7 D transforms Hearn & Baker, chapter 5 Aliasing and Anti-Aliasing Problem: jaggies Also known as aliasing. It results
More informationGeometric transformations assign a point to a point, so it is a point valued function of points. Geometric transformation may destroy the equation
Geometric transformations assign a point to a point, so it is a point valued function of points. Geometric transformation may destroy the equation and the type of an object. Even simple scaling turns a
More informationUnit 12 Topics in Analytic Geometry - Classwork
Unit 1 Topics in Analytic Geometry - Classwork Back in Unit 7, we delved into the algebra and geometry of lines. We showed that lines can be written in several forms: a) the general form: Ax + By + C =
More information2D 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 informationYEAR/SEM: III/V SEM SUBJECT: CS6504-COMPUTER GRAPHICS
PRIYADARSHINI ENGINEERING COLLEGE, Vaniyambadi 635751 DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING YEAR/SEM: III/V SEM SUBJECT: CS6504-COMPUTER GRAPHICS COURSE SYLLABI CS6504 COMPUTER GRAPHICS Lecture
More informationUNIT-III GRAPHICS PROGRAMMING
S.No 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 1 TABLE OF CONTENTS DATE TOPIC UNIT-I 2D PRIMITIVES Output primitives Line, Circle and Ellipse drawing algorithms Attributes
More informationUNIT I INTRODUCTION. Survey of Computer Graphics
CS6504 COMPUTER GRAPHICS UNIT I INTRODUCTION Survey of computer graphics, Overview of graphics systems Video display devices, Raster scan systems, Random scan systems, Graphics monitors and Workstations,
More informationPipeline and Rasterization. COMP770 Fall 2011
Pipeline and Rasterization COMP770 Fall 2011 1 The graphics pipeline The standard approach to object-order graphics Many versions exist software, e.g. Pixar s REYES architecture many options for quality
More informationCS 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