Advantages & disadvantages of DDA:- • Faster than the direct use of the line equation and it does not do any floating point multiplication. • Floating point Addition is still needed. • Precision loss because of rounding off. • Pixels drift farther apart if line is relatively larger. Raster-scan system:- 1)raster displays have less resolution. 2)the lines producced are ziz-zag as the plotted values are discrete. 3)high degree realism is achived in picture with the aid of advanced shading and hidden surface technique. 4)decreasing memory costs have made raster systems popular. Random scan system:- 1)random displays have high resolutions since the picture definition is stored as a set of line drawing commands and not as a set of intensity values. 2)smooth lines are produced as the electron beam directly follows the line path. 3)realism is difficult to achieve. 4)random-scan system's are generally costlier. Raster-scan system:- 1)raster displays have less resolution. 2)the lines produced are ziz-zag as the plotted values are discrete. 3)high degree realism is achived in picture with the aid of advanced shading and hidden surface technique. 4)decreasing memory costs have made raster systems popular. 5)In this case, the electron beam is swept across the screen, one row at a time from top to bottom. 6)Picture definition is stored in a memory area called the refresh buffer/frame buffer. 7)Refreshing on raster scan displays is carried out at the rate of 60 to 80 frames/second. Random scan system:- 1)random displays have high resolutions since the picture definition is stored as a set of line drawing commands and not as a set of intensity values. 2)smooth lines are produced as the electron beam directly follows the line path. 3)realism is difficult to achieve. 4)random-scan system's are generally costlier. 5)Here CRT has the electron beam directly only to the parts of the screen where a picture is to be drawn. 6)Picture definition is stored as a set of line drawing commands in an area of memory referred to as refresh display file. 7)Random scan systems are designed to draw all the component lines of a picture 30 to 60 times each second. Shadow Mask Commonly used in raster scan display. produce much wider range of color. picture quality is greater. Delta Shadow Mask Commonly used in color CRT system. produce less wider range of color. picture quality is less. Shadow Mask Commonly used in raster scan display. produce much wider range of color. picture quality is greater. Delta Shadow Mask Commonly used in color CRT system. produce less wider range of color. picture quality is less. 1. State the application of computer graphics .explain any five. 2. Explain DDA algorithm .Solve(1,1) to (5,3) using DDA algorithm 3. Derive Bresenham’s line drawing algorithm .plot line(20,10)(30,18) 4. Consider the line from (0,0) to (6,7).use bresenham’s algorithm to rasterize aline. 5. Differentiate between DDA and Bresenham’s algorithm 7. Derive midpoint circle algorithm .state the algorithm. 8. Derive Bresenham’s circle algorithms DDA vs Bresenham Algorithm DDA and Bresenham Algorithm are terms you would have come across when studying computer graphics. Before explaining the difference between these two term, let’s see what is DDA and what is Bresenham Algorithm. The invention of computer made things simple and one of them being solving of differential equations. Earlier it was done by mechanical differential analyzer that was slow and full of errors but DDA or Digital differential Analyzer is the application of analyzer in digital form which is accurate and fast. Differential analyzer is used to make lines between two points so that a straight line or polygon with n number of sides can be seen on the screen. Distance between two points or a pixel is described by a differential equation where coordinates of the starting point and that of ending point are specified in the software. This can be achieved by DDA and Bresenham Algorithm. What is DDA? DDA is used in drawing straight line to form a line, triangle or polygon in computer graphics. DDA analyzes samples along the line at regular interval of one coordinate as the integer and for the other coordinate it rounds off the integer that is nearest to the line. Therefore as the line progresses it scan the first integer coordinate and round the second to nearest integer. Therefore a line drawn using DDA for x coordinate it will be x0 to x1 but for y coordinate it will be y=ax+ b and to draw function it will be Fn(x, y rounded off). What is Bresenham Algorithm? Bresenham Algorithm was developed by J.E.Bresenham in 1962 and it is much accurate and much more efficient than DDA. It scans the coordinates but instead of rounding them off it takes the incremental value in account by adding or subtracting and therefore can be used for drawing circle and curves. Therefore if a line is to be drawn between two points x and y then next coordinates will be( xa+1, ya) and (xa+1, ya+1) where a is the incremental value of the next coordinates and difference between these two will be calculated by subtracting or adding the equations formed by them. Difference Between DDA and Bresenham Algorithm • DDA uses floating points where as Bresenham algorithm use fixed points. • DDA round off the coordinates to nearest integer but Bresenham algorithm does not. • Bresenham algorithm is much accurate and efficient than DDA. • Bresenham algorithm can draw circles and curves with much more accuracy than DDA. • DDA uses multiplication and division of equation but Bresenham algorithm uses subtraction and addition only. Differences between digital differential analyzer and bresenham algorithm? DDA uses float numbers and uses operators such as division and multiplication in its calculation. Bresenhams algorithm uses ints and only uses addition and subtraction. Due to the use of only addition subtraction and bit shifting (multiplication and division use more resources and processor power) bresenhams algorithm is faster than DDA in producing the line. Im not sure, though if i remember right, they still produce the same line in the end. One note concerning efficiency: Fixed point DDA algorithms are generally superior to Bresenhams algorithm on modern computers. The reason is that Bresenhams algorithm uses a conditional branch in the loop, and this results in frequent branch mispredictions in the CPU. Fixed point DDA also has fewer instructions in the loop body (one bit shift, one increment and one addition to be exact. In addition to the loop instructions and the actual plotting). As CPU pipelines become deeper, mispredictions penalties will become more severe. Since DDA uses rounding off of the pixel position obtained by multiplication or division, causes an accumulation of error in the proceeding pixels whereas in Bresenhams line algorithm the new pixel is calculated with a small unit change in one direction and checking of nearest pixel with the decision variable satisfying the line equation. BUT this error can be calculated and will not cause problems for typical line drawing applications. Lines longer than what fits on a typical computer screen (a few thousand pixels) will be identical to Bresenham lines when using 32 bit integers. Fixed point DDA also has another advantage: Since it does not require conditional jumps, you can compute several lines in parallel with SIMD (Single Instruction Multiple Data) techniques. What is the main difference between a crt and a lcd monitor? A CRT has less resolution that whats available in LCD technology. CRT technology is more than 50 years old-LCD is relatively new. LCD monitors cost about 2-3 times as much. Price Size Image Quality Energy Consumption Personal Comfort Response Time Price The price of LCD monitors is much lower than a few years (or even months) ago, but still far exceeds the price of a comparable CRT monitor. For example, I spent about $600 (US) on a Viewsonic VA-720 17" LCD monitor in early 2003, and see that the same model now sells for less than $300. A significant price drop, but in comparison a 17" Viewsonic CRT monitor can currently be purchased for less than $100. The ratio of prices may have narrowed from about 5:1 to 3:1, but the aging technology behind CRTs still allows it to hold the lead. Size One reason that LCDs have gained in popularity is because of their small foot print. The overall size and weight of CRT monitors far exceeds that of LCD monitors. CRTs share the same image processing technology with tube televisions, and therefore share the same bulky style of housing. For example, the manufacturer's web page lists the ACER 19" LCD monitor as having a depth of a mere 6.9" (including the base) and a weight of 12.1 pounds. As a point of reference, a 19" ACER CRT is significantly larger with a depth of 16.86" and a hefty weight of 46.31 pounds. Desktop real estate is precious, and an LCD will require only a small fraction of the depth that a CRT would require. And if there isn't even enough room on your desk for a slim LCD monitor, the low weight makes them perfectly adaptable to be hung on the wall, or off of a radial arm mount. Image Quality Image quality is generally considered to be better on an LCD, as each pixel is generated by a specific set of transistors in the screen, which produces a crisp image. But some features that fall under the general heading of image quality might not favor an LCD, including viewing angle, brightness, and contrast. Early LCD monitors had a fairly narrow viewing angle that made clearly seeing the screen from anywhere but directly in front of it difficult. This has improved greatly, but still doesn't quite rival the viewing angle of CRTs which provide the same picture quality regardless of the angle. A monitor with a maximum vertical viewing angle of 120 degrees should not be hard to find at this point, with many monitors now being able to provide an even greater angle. Brightness is an area that LCD monitors may have the edge over CRTs, but it varies widely from unit to unit. The standard measure for brightness is referred to as "nits", which have units of cd/m2 (candelas per square meter), where a higher number is better. Contrast is similar to brightness in the fact that it varies widely from unit to unit, and is a specification where a higher number is desired. The contrast is represented as a ratio, where higher numbers imply that bright colors can be displayed next to dark colors without them appearing washed out. Monitors with lower numbers in the ratio may also result in dark shades being displayed as just black, and any detail in these areas may be lost. Energy Consumption LCD monitors definitely hold the edge over CRT monitors when it comes to being energy efficient. The huge tube in a CRT monitor is the source of most of its energy consumption, and a comparably sized LCD may use just a fraction of the electricity. Personal Health and Comfort The main benefit that LCDs have when it comes to comfort is the reduced strain on your eyes. The reduced glare on the screen's surface, and the elimination of a typical CRT's "refresh", can prevent your eyes from getting tired from extended use. A CRT monitor redraws the image on the entire screen as it refreshes, whereas an LCD monitor only changes the necessary pixels during a refresh. There may also be the unquantifiable effect of reduced electromagnetic emissions on LCD monitors. The exact impact of electromagnetic emissions may not be fully understood, but in general less is considered to better, as addressed in this article. And, your back may also appreciate an LCD when it comes time to move, as the example above shows a 19" LCD monitor weighs about ¼ as much as its CRT counterpart. Response Time The transistors that create the image on a TFT LCD can be a bottleneck to its performance, especially in fast paced 3D games where speed is critical. Related to the different approach taken with screen refreshes, the amount of time it takes the pixels to change in order to display the new image is referred to as the response time. If the response time is too slow, one may experience blurred images or ghost effects where the previous image is still slightly visible with the new image. LCD monitor response times have greatly improved over the past few years, and many LCDs are now fast enough to consider for serious 3D gaming use, but specifications still vary from unit to unit. A few years ago a typical response time on an LCD monitor may have been anywhere from 30 to 50 milliseconds, and today these numbers can get down into the single digits, with anything 25 milliseconds or less being quite common (lower is definitely better). Final Words In addition to some of the positives mentioned, many LCD monitors now incorporate other features to make them more practical and even fun. LCD monitors can now be found with integrated USB hubs, stereo speakers, and TV tuners, and for the right price, HDTV is even an option. LCD monitors will continue to replace CRTs as they become less expensive and the many benefits are realized by consumers, but CRTs won't disappear all together as many situations require the performance that LCDs currently can't provide. http://engineeringppt.blogspot.com/2009/08/computer-graphics-lectures-notes-ppt.html