FRAME BUFFER Frame Buffer: A digital frame buffer is large, contiguous piece of computer memory used to hold or map the image displayed on the screen. At a minimum, there is 1 memory bit for each pixel in the raster. This amount of memory is called a bit plane. A 1024 x 1024 element requires 2 20 (2 10 =1024;2 20 =1024 x 1024)sq.raster or 1,048,576 memory bits in a single bit plane. The picture is built up in the frame buffer one bit at a time. ∵ A memory bit has only two states (binary 0 or 1), a single bit plane yields a black and white (monochrome display). As frame buffer is a digital device write raster CRT is an analog device.
Persistence: Persistence is the duration of phosphorescence. Different kinds of phosphors are available for use in CRT. Besides color, a major difference between phosphor in their persistence how they continue to emit light after the electron beam is removed. 2. Resolution: Use to describe the number of pixels that are used on display image. 3. Aspect Ratio: It is the ratio of width to its height. Its measure is unit in length or number of pixels. Aspect Ratio=Width/height
Camera Resolution
RASTER SCAN SYSTEM vs RANDOM SCAN SYSTEM
RASTER SCAN DISPLAY Raster Scan Displays are most common type of graphics monitor which employs CRT. It is based on television technology. In raster scan system electron beam sweeps across the screen, from top to bottom covering one row at a time.A pattern of illuminated pattern of spots is created by turning beam intensity on and off as it moves across each row. A memory area called refresh buffer or frame buffer stores picture definition. This memory area holds intensity values for all screen points. Stored intensity values are restored from frame buffer and painted on screen taking one row at a time.Each screen point is referred to as pixels.
RANDOM SCAN DISPLAY In Random-Scan Display electron beam is directed only to the ares of screen where a picture has to be drawn. It is also called vector displays, as it draws picture one line at time. It can draw and refresh component lines of a picture in any specified sequence. Pen plotter is an example of random-scan displays. The number of lines regulates refresh rate on random-scan displays. An area of memory called refresh display files stores picture definition as a set of line drawing commands. The system returns back to first line command in the list, after all the drawing commands have been processed. High-quality vector systems can handle around 100, 00 short lines at this refresh rate. Faster refreshing can burn the phosphor. To avoid this every refresh cycle is delayed to prevent refresh rate greater than 60 frames per second.
RASTER SCAN DISPALY
RASTER SCAN
RANDOM SCAN
SCAN CONVERSION It is a process of representing graphics objects a collection of pixels. The graphics objects are continuous. The pixels used are discrete. Each pixel can have either on or off state. 0 is represented by pixel off. 1 is represented using pixel on. Examples of objects which can be scan converted Point Line Sector Arc
Ellipse Rectangle Polygon Characters Filled Regions
SCAN CONVERSION OF POINT a point involves two coordinate values Point p=(x,Y) Ex Consider a pont (2 ½, 1 ,¾ ) represented by pixel (2, 1). In general, a point p (x, y) is represented by the integer part of x & the integer part of y that is pixels [(INT (x), INT (y).
SCAN CONVERSION OF STRAIGHT LINE A straight line may be defined by two endpoints & an equation. In fig the two endpoints are described by (x 1 ,y 1 ) and (x 2 ,y 2 ). The equation of the line is used to determine the x, y coordinates of all the points that lie between these two endpoints.
Using the line equation y=mx+b We calculate slope m= dy/dx and intercept b= y-mx We find the line points or coordinate values lies between (x1,y1) and (x2,y2)
Direct Method If m<=1 else while(x<=x2) while(y<=y2) { { x=x+1 y=y+1 y=mx+b x=y-b/m Round y value round x value Put pixel(x,y) put pixel (x,y) } }
DDA Line Drawing Algorithm DDA stands for Digital Differential Analyzer . It is an incremental method of scan conversion of line. In this method calculation is performed at each step but by using results of previous steps. Advantage: It is a faster method than method of using direct use of line equation. This method does not use multiplication theorem. It is an easy method because each step involves just two additions.
DDA ALGORITHM Step1: Start Algorithm Step2: Declare x 1 ,y 1 ,x 2 ,y 2 ,dx,dy,x,y as integer variables. Step3: Enter value of x 1 ,y 1 ,x 2 ,y 2 . Step4: Calculate dx = x 2 -x 1 Step5: Calculate dy = y 2 -y 1
Step6: If ABS (dx) > ABS (dy) Then steps = abs (dx) Else steps=abs(dy) Step7: x inc =dx/step y inc =dy/step Step9: x = x + x inc y = y + y inc Set pixels (Round (x), Round (y)) Step10: Repeat step 9 Step11: End Algorithm
Bresenham’s Line Drawing Algorithm The disadvantage of DDA algorithm is which involves floating point calculation. Increase the speed of line drawing algorithm, Bresenham introduced an Integer Incremental Algorithm. This method uses a decision parameter P, P0 = 2Δy-Δx
1. Input the two line endpoints (x1,y1) and (x2,y2) 2. load (x1,y1) into frame buffer, ie. Plot the first point. 3. Calculate slope ‘m’ the constants Δx, Δy, 2Δy and obtain the starting value for the decision parameter as P = 2Δy-Δx 4.if |m| < 1 If Pk< 0, the next point to plot is(xk+1,yk) and Pk+1 = Pk+ 2Δy Otherwise, the next point to plot is (xk+1,yk+1) and Pk+1 = Pk+ 2Δy - 2Δx 5. Perform step4 Δx times.
6 . if |m| >=1 If Pk< 0, the next point to plot is(xk,yk+1) and Pk+1 = Pk+ 2ΔX Otherwise, the next point to plot is (xk+1,yk+1) and Pk+1 = Pk+ 2ΔX- 2ΔY 7. Perform step4 ΔY times.
Declare (x1,y1) and (x2,y2) Calculate dx=(x2-x1) dy=(y2-y1) p=2*dy-dx and m=dy/dx If |m| <1 else while(x<x2) while(y<y2) { { if(p<0) if(p<0) x=x+1 p=p+2*dy Else x=x+1 y=y+1 p=p+2dy-2dx End if Plot pixel }