It is designed to allow the exchange of vector information between different CAD applications. HPGL files typically have the extension.
The file extensions used include. However, the use of the. We want to say, hardware also dominate the world of graphics. So, let us discuss some hardware devices which help us to work with graphic packages.
Input and Output Devices Input and Output devices are quite important for any software because an inappropriate selection of the concerned hardware may produce some erroneous results or may process data of some other format. A typical application of touch panels is for the selection of processing options that are represented with graphical icons.
Optical touch panels employ a line of infrared LEDS light emitting diodes along one vertical edge and along one horizontal edge of frame.
The opposite vertical and horizontal edges contain light detection. These detections are used to record the beams that may have been interrupted when the panel was touched. Two crossing beams that are interrupted identify the horizontal and vertical coordinates of screen position selected. An electrical touch panel is constructed with two transparent plates separated by a short distance.
One of the plates is coated with a conducting material and the other is resistive material. When the outer plate is touched, it is forced into contact with the inner plate. The contact creates a voltage drop that is converted to a coordinate value of the selected screen position. They are not too reliable or accurate, but are easy to use. Four types are commonly in use. They are as follows: 1. Electrical TSS: Wire grid or other conductive coating is utilised to indicate a voltage drop at the point touched point, from which the position may be determined.
Electro-Mechanical TSS: A glass or plastic sheet with strain gages placed around the edges records the position by the relative magnitude of the deformation of the slightly bent plate. Acoustic TSS: Inaudible high-frequency sound waves are emitted along two perpendicular edges and reflected to the emitters by the finger; the echo interval is used as a measure of the distances from the edges. Light Pen Light pen is a pointing device. It has a light sensitive tip which is excited when the light is emitted and an illuminated point on the screen comes in its field of view.
Unlike other devices which have associated hardware to track the device and determine x and y values, the light pen needs software support some kind of tracking program. Pointing operations are easily programmed for light pens. Figure below shows two typical applications of a light pen. It has a light sensitive tip and a photocell mounted in a pen-like case.
If the light pen is pointed at an item on the screen it generates information from which the item can be identified by the program.
By identifying the instruction responsible for the illuminated point, the machine can discover which object the pen is pointing to. A light pen is an event driven device. The processor has to wait till it comes across an illuminated point on the screen to obtain any information. The keyboard is another typical example of an event driven device. The processor has to wait for a key to be pressed before it can determine what the user wants to input.
Event driven devices can be handled in two ways as follows: a Polling: The status of each device is periodically checked in a repetitive manner by a polling loop. When an event occurs, the loop is exited and the corresponding event is Dr. Again the polling continues. The disadvantage is that the processor has to wait in an idle state until some event occurs.
Data entered can be lost if an event occurs at a time when the main program is not in its polling loop. The device sends an interrupt signal to the processor when an event occurs. The processor breaks from its normal execution and executes some special interrupt-handling routine or task. After the task is complete the control returns to the main program. To handle situations when more than one event occurs, different priorities are assigned to tasks so that higher priority tasks may interrupt tasks of lower priority.
Several events may occur before the program is ready for them. When more than one event occurs, the associate information is entered into the event queue. A polling loop can be employed to check the status of the event queue. The event queue can then pass input data from the polling task to the main program in the correct order. The main program takes events off the head of the queue and invokes the appropriate process.
The devices need not be checked repeatedly for occurrence of events. Devices can interrupt even with the processor being unaware of it.
Two kinds of light pen interrupts may occur. If the user points the pen at an item on the screen to select it, as in Figure a above, a selection interrupt occurs. Modified versions of the light pen may also be used to draw lines, read barcodes, or do transformation operations on objects on the screen or on a tablet.
Graphics Tablet Before going into details on the graphic tablet, we need to know what we mean by tablet in computer terminology because, in other disciplines, the word tablet carries different meanings. This small digitiser is used for interactive work on a graphics workstation. Actually this device is essential when someone wants to do free hand drawing or to trace any solid geometrical shape.
So a graphic tablet is a drawing tablet used for sketching new images or tracing old ones. Or we may say that a graphics tablet is a computer input device that allows one to hand-draw images and graphics, similar to the way one draws images with a pencil on paper. Or a Graphics tablet is a computer peripheral device that allows one to hand images directly to a computer, generally through an imaging program. The image drawn or traced generally does not appear on the tablet itself but rather is displayed on the computer monitor.
The tablet and a hand-held pointer in the form of a stylus pen or puck can serve one or more of these three functions: a For selecting positions on a drawing or on a menu on the screen by moving the stylus on the tablet, in a sense using the stylus and tablet as pen on paper.
This device is more accurate and efficient than a light pen. These are two types in use: a Voltage or Electro-Magnetic Field Tablet and Pointer: This has a grid of wires, embedded in the tablet surface, with different voltages or magnetic fields corresponding to different coordinates.
Intermediate positions within a cell can also be interpolated. From the arrival time of the sound pulse at the microphones, the perpendicular distances of the stylus tip from the two axes are known. The acoustic method suffers from its inherent noisiness as well as its susceptibility to interference from other noise.
A combination of electric pulses and time-delay detection by a sensor in the stylus, called Electro-acoustic Table is also available. When drawing or tracing on the tablet, a series of x-y coordinates vector graphics are created, either as a continuous stream of coordinates, or as end points. Further the drawings created or traced on tablets are stored as mathematical line segments; and these features of tablets help to produce, tablet computers, tablet PCs and pen tablets.
Note: Objects are drawn with a pen or stylus or puck, but are traced with the puck only. Tablet computers can be specialised for only Internet use or be full-blown, general-purpose PCs with all the bells and whistles of a desktop unit.
The distinguishing characteristic is the use of the screen as an input device using a stylus or finger. Pen Tablet: A digitiser tablet that is specialised for handwriting and hand marking. LCD- Dr. Non-display tablets display the handwriting on a separate computer screen. Plotter A plotter is a vector graphics-printing device that connects to a computer.
Now-a-days, we use the plotter right from the field of engineering, to media and advertising. Even in our day-to-day lives we see a large number of computer designed hoardings as publicity material. This fine output is achieved by using plotters with computers. But the printer may also be connected to the computer. The question then arises, as to how they differ from each other. So let us discuss the differences between them. This means that plotters are restricted to line art, rather than raster graphics as with other printers.
They can draw complex line art, including text, but do so very slowly because of the mechanical movement of the pen. Thus, the printer is enough to generate a page of output, but this is not the case with the line art of the plotter. The most common graphics output device is the video monitor which is based on the standard cathode ray tube CRT design, but several other technologies exist and solid state monitors may eventually predominate.
A beam of electrons cathode rays emitted by an electron gun, passes through focusing and deflection systems that direct the beam toward specified positions on the phosphor-coated screen. The phosphor then emits a small spot of light at each position contacted by the electron beam. Because the light emitted by the phosphor fades very rapidly, some method is needed for maintaining the screen picture.
One Way to keep the phosphor glowing is to redraw the picture repeatedly by quickly directing the electron beam back over the same points. This type of display is called a refresh CRT. Working Beam passes between two pairs of metal plates, one vertical and other horizontal. A voltage difference is applied to each pair of plates according to the amount that the beam is to be deflected in each direction.
As the electron beam passes between each pair of plates, it is bent towards the plate with the higher positive voltage.
In figure below the beam is first Dr. Then, as the beam passes through the horizontal plates, it is deflected towards, the top or bottom of the screen. To get the proper deflection, adjust the current through coils placed around the outside of the CRT loop. The primary components of an electron gun in a CRT are the heated metal cathode and a control grid.
Heat is supplied to the cathode by directing a current through a coil of wire, called the filament, inside the cylindrical cathode structure. This causes electrons to be "boiled off" the 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 accelerating voltage can be generated with a positively charged metal coating on the in- side of the CRT envelope near the phosphor screen, or an accelerating anode can be used, as in Fig. Sometimes the electron gun is built to contain the accelerating anode and focusing system within the same unit. The focusing system in a CRT is needed to force the electron beam to converge into a small spot as it strikes the phosphor.
Otherwise, the electrons would repel each other, and the beam would spread out as it approaches the screen. Focusing is accomplished with either electric or magnetic fields. Electrostatic focusing is commonly used in television and computer graphics monitors. With electrostatic focusing, the electron beam passes through a positively charged metal cylinder that forms an electrostatic lens, as shown in Fig. The action of the electrostatic lens focuses the electron beam at the centre of the screen, in exactly the same way that an optical lens focuses a beam of light at a particular focal distance.
Similar lens focusing effects can be accomplished with a magnetic field set up by a coil mounted around the outside of the CRT envelope. Magnetic lens focusing produces the smallest spot size on the screen and is used in special-purpose devices. As with focusing, deflection of the electron beam can be controlled either with electric fields or with magnetic fields.
Cathode-ray tubes are now commonly constructed with magnetic Dr. Two pairs of coils are used, with the coils in each pair mounted on opposite sides of the neck of the CRT envelope.
One pair is mounted on the top and bottom of the neck and the other pair is mounted on opposite sides of the neck. The magnetic field produced by each pair of coils results in a transverse deflection force that is perpendicular both to the direction of the magnetic field and to the direction of travel of the electron beam. Horizontal deflection is accomplished with one pair of coils, and vertical deflection by the other pair. The proper deflection amounts are attained by adjusting the current through the coils.
When electrostatic deflection is used, two pairs of parallel plates are mounted inside the CRT envelope. One pair of plates is mounted horizontally to control the vertical deflection, and the other pair is mounted vertically to control horizontal deflection Fig. Spots of light are produced on the screen by the transfer of the CRT beam energy to the phosphor.
When the electrons in the beam collide with the phosphor coating, they are stopped and their kinetic energy is absorbed by the phosphor. Part of the beam energy is converted by friction into heat energy, and the remainder causes electrons in the phosphor atoms to move up to higher quantum-energy levels. After a short time, the "excited" phosphor electrons begin dropping back to their stable ground state, giving up their extra energy as small quantum of light energy.
What we see on the screen is the combined effect of all the electron light emissions: a glowing spot that quickly fades after all the excited phosphor electrons have returned to their ground energy level. The frequency or colour of the light emitted by the phosphor is proportional to the energy difference between the excited quantum state and the ground state. Figure sidewise shows the intensity distribution of a spot on the screen.
The intensity is greatest at the centre of the spot, and decreases with a Gaussian distribution out to the edges of the Dr. This distribution corresponds to the cross-sectional electron density distribution of the CRT beam. Resolution The maximum number of points that can be displayed without overlap on a CRT is referred to as the resolution.
A more precise definition of resolution is the number of points per centimeter that can be plotted horizontally and vertically, although it is often simply stated as the total number of points in each direction.
This depends on the type of phosphor used and the focusing and deflection system. Aspect Ratio Another property of video monitors is aspect ratio. This number gives the ratio of vertical points to horizontal points necessary to produce equal-length lines in both directions on the screen. Sometimes aspect ratio is stated in terms of the ratio of horizontal to vertical points.
The image is constructed out of a sequence of straight line segments. Each line segment is drawn on the screen by directing the beam to move from one point on screen to the next, where each point is defined by its X and Y coordinates. After drawing the picture, the system cycles back to the first line and design all the lines of the picture 30 to 60 time each second.
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 as vector displays or stroke-writing or calligraphic displays Figure below A pen plotter operates in a similar way and is an example of a random-scan, hard-copy device.
Refresh rate on a random-scan system depends on the number of lines to be displayed. Picture definition is now stored as a set of line-drawing commands in an area of memory referred to as the refresh display file. Random-scan systems are Dr. 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. Raster-Scan Displays In raster scan approach, the viewing screen is divided into a large number of discrete phosphor picture elements, called pixels. The matrix of pixels constitutes the raster. The number of separate pixels in the raster display might typically range from X to X Each pixel on the screen can be made to glow with a different brightness.
Colour screen provide for the pixels to have different colours as well as brightness. 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 moves across each row, the beam intensity is turned on and off to create a pattern of illuminated spots.
Picture definition is stored in a memory area called the 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 the screen one row scan line at a time Figure above. Each screen point is referred to as a pixel or pel shortened forms of 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 subtle shading and color patterns. Home television sets and printers are examples 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 Dr. For a bi-level system, a bit value of 1 indicates that the electron beam is to be turned on at that position, and a value of 0 indicates that the beam intensity is to be off. Additional bits are needed when color and intensity variations can be displayed.
On some raster-scan systems and in TV sets , each frame is displayed in two passes using an interlaced refresh procedure. In the first pass, the beam sweeps across every other scan line from top to bottom. Then after the vertical re- trace, the beam sweeps out the remaining scan lines. Interlacing of the scan lines in this way allows us to see the entire screen displayed in one-half the time it would have taken to sweep across all the lines at once from top to bottom.
Interlacing is primarily used with slower refreshing rates. On an older, 30 frame- per-seconds, noninterlaced display, for instance, some flicker is noticeable. This is an effective technique for avoiding flicker, providing that adjacent scan lines contain similar display information. Color CRT Monitors To display colour pictures, combination of phosphorus is used that emits different coloured light. There are two different techniques for producing colour displays with a CRT.
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. The speed of the electrons, and hence the screen color at any point, is controlled by the beam-acceleration voltage. 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 Mask Method Shadow-mask methods 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 Dr. Figure below illustrates the delta-delta shadow-mask method, commonly used in color CRT- systems. 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 passes through a hole 'in the shadow mask, they activate a dot triangle, which appears as a small color spot on the screen. The phosphor dots in the triangles are arranged so that each electron beam can activate only its corresponding color dot when it passes through the shadow mask. Another configuration for the three electron guns is an in-line arrangement in which the three electron guns, and the.
Corresponding red-green-blue color dots on the screen are aligned along one scan line instead of in a triangular pattern. This in-line arrangement of electron guns is easier to keep in alignment and is commonly used in high-resolution color CRTs. 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. Other combinations of beam intensities produce a small light spot for each pixel position, since our eyes tend to merge the three colors into one composite. The color we see depends on the amount of excitation of the red, green, and blue phosphors. A white or gray area is the result of activating all three dots with equal intensity.
Yellow is produced with the green and red dots only, magenta is produced with the blue and red dots, and cyan shows up when blue and green are activated equally. In some low-cost systems, the electron beam can only be set to on or off, limiting displays to eight colors. More sophisticated systems can set intermediate intensity levels for the electron beams, allowing several million different colors to be generated. A direct-view storage tube DVST stores the picture information as a charge distribution just behind the phosphor-coated screen.
Two electron guns are used in a DVST. One, the primary gun, is used to store the picture pattern; the second, the flood gun, maintains the picture display.
Because no refreshing is needed, very complex pictures can be displayed at very high resolutions without flicker. To eliminate a picture section, the entire screen must be erased and the modified picture redrawn. The erasing and redrawing process can take several seconds for a complex picture. For these reasons, storage displays have been largely replaced by raster systems. Flat-Panel Displays The term flat panel display refers to a class of video device that have reduced volume, weight and power requirement compared to a CRT.
A significant feature of flat-panel displays is that they are thinner than CRTs, and we can hang them on walls or wear them on our wrists.
Since we can even write on some flat-panel displays, they will soon be available as pocket notepads. Current uses for flat-panel displays include small TV monitors, calculators, pocket video games, laptop computers, armrest viewing of movies on airlines, as advertisement boards in elevators, and as graphics displays in applications requiring rugged, portable monitors.
The emissive displays or emitters are devices that convert electrical energy into light. Plasma panels, thin-film electroluminescent displays, and- light-emitting diodes are examples of emissive displays.
But flat CRTs have not proved to be as successful as other emissive devices. Nonemmissive displays or nonemitters use optical effects to convert sunlight or light from some other source into graphics patterns. The most important example of a nonemissive flat-panel display is a liquid-crystal device. Light-emitting Diode LED In LED, a matrix of diodes is arranged to form the pixel positions in the display and picture definition is stored in a refresh buffer.
Information is read from the refresh buffer and converted to voltage levels that are applied to the diodes to produce the light patterns in the display. Liquid-crystal Displays LCDs Liquid crystal displays are the devices that produce a picture by passing polarized light from the surroundings or from an internal light source through a liquid crystal material that transmit the light.
Liquid-crystal displays LCDs are commonly used in small systems, such as calculators and portable, laptop computers. These non-emissive devices produce a Dr. The term liquid crystal refers to the fact that these compounds have a crystalline arrangement of molecules, yet they flow like a liquid. Flat- panel displays commonly use Nematic threadlike liquid- crystal compounds that tend to keep the long axes of the rod-shaped molecules aligned.
A flat-panel display can then be constructed with a nematic liquid crystal, as demonstrated in Figure here. Two glass plates, each containing a light polarizer at right angles to the other plate, sandwich the liquid-crystal material.
Rows of horizontal transparent conductors are built into one glass plate, and columns of vertical conductors are put into the other plate. The intersection of two conductors defines a pixel position. Normally, the molecules are aligned as shown in the "on state" of Figure above Polarized light passing through the material is twisted so that it will pass through the opposite polarizer. The light is then reflected back to the viewer.
To turn off the pixel, we apply a voltage to the two intersecting conductors to align the molecules so that the light is not twisted. This type of flat-panel device is referred to as a passive-matrix LCD. Picture definitions are stored in a refresh buffer, and the screen is refreshed at the rate of 60 frames per second, as in the emissive devices. Back lighting is also commonly applied using solid-state electronic devices, so that the system is not completely dependent on outside light sources.
Colors can be displayed by using different materials or dyes and by placing a triad of color pixels at each screen location. Another method for constructing LCDs is to place a transistor at each pixel location, using thin-film transistor technology.
The transistors are used to control the voltage at pixel locations and to prevent charge from gradually leaking out of the liquid-crystal cells. These devices are called active-matrix displays. Hard Copy Devices The printer is an important accessory of any computing system. In a graphics system, it is the quality of printed output which is one of the key factors necessary to convince both the Dr.
The major factors which control the quality of a printer are individual dot size on the paper and the number of dots per inch. We can obtain hard-copy output for our images in several formats.
For presentations or archiving, we can send image files to devices or service bureaus that will produce mm slides or overhead transparencies. To put images on film, we can simply photograph a scene displayed on a video monitor. And we can put our pictures on paper by directing graphics output to a printer or plotter. Printers produce output by either impact or nonimpact methods. Impact printers press formed character faces against an inked ribbon onto the paper.
A line printer is an example of an impact device, with the typefaces mounted on bands, chains, drums, or wheels. Nonimpact printers and plotters use laser techniques, ink-jet sprays, xerographic processes as used in photocopying machines , electrostatic methods, and electrothermal methods to get images onto paper.
In a laser device, a laser beam creates a charge distribution on a rotating drum coated with a photoelectric material, such as selenium. Toner is applied to the drum and then transferred to paper. Ink-jet methods produce output by squirting ink in horizontal rows across a roll of paper wrapped on a drum. The electrically charged ink stream is deflected by an electric field to produce dot-matrix patterns.
It is clear that these devices need special procedures for displaying any graphic object: line, circle, curves, and even characters. Irrespective of the procedures used, the system can generate the images on these raster devices by turning the pixels on or off. The process in which the object is represented as the collection of discrete pixels is called scan conversion. The video output circuitry of a computer is capable of converting binary values stored in its display memory into pixel-on, pixel-off information that can be used by a raster output device to display a point.
This ability allows graphics computers to display models composed of discrete dots. Almost any model can be reproduced with a sufficiently dense matrix of dots pointillism , most human operators generally think in terms of more complex graphics objects such as points, lines, circles and ellipses.
Since the inception of computer graphics, many algorithms have been developed to provide human users with fast, memory-efficient routines that generate higher-level objects of this kind.
However, regardless of what routines are developed, the computer can produce images on raster devices only by turning the appropriate pixels on or off. Many scan-conversion algorithms are implemented in computer hardware or firmware. However, a specific graphics algorithm, the scan-conversion algorithm can be implemented in software. The most commonly used graphics objects are the line, the sector, the arc, the ellipse, the rectangle and the polygon.
Scan-converting a Point We have already defined that a pixel is collection of number of points. Thus it does not represent any mathematical point. Suppose we wish to display a point C 5. It means that we wish to illuminate that pixel, which contains this point C. Well, it also corresponding to the same pixel as that of C 5. Thus we can say that point C x, y is represented by an integer part of X and integer part of Y.
So, we can use the command as Putpixel int x, int y ; We will now look into the actual process of plotting a point. We normally use right handed Cartesian coordinate system. The origin in this system starts at the bottom. However in case of computer system, due to the memory organization, the system turns out to left handed Cartesian system.
Thus there is a difference in the actual representation and the way in which we work with the points. Step 2: Find the byte address in which the point is to be displayed.
Step 3: Compute the value for the byte that represents the point. Step 4: Logically OR the calculated value with the present value of the byte. Step 5: Store the value found in step 4 in the byte found in steps 1 and 2. Step 6: Stop. Scan-converting a Straight Line A scan conversion of line locates the coordinates of the pixels lie on or near an ideal straight line impaired on 2D raster grid. Before discussing the various methods, let us see what the characteristics of line are.
One expects the following features of line: 1. The line should appear straight line. The line should have equal brightness throughout their length. The line must be drawn rapidly. Even though the rasterization tries to generate a completely straight line, yet in few cases we may not get equal brightness. Basically, the lines which are horizontal or vertical or oriented by , have equal brightness. But for the lines with larger length and different orientations, we need to have complex computations in our algorithms.
This may reduce the speed of generation of line. Thus we make some sort of compromise while generating the lines, such as: 1. Calculate only the approximate line length. Make use of simple arithmetic computations, preferably integer arithmetic. Implement result in hardware or firmware. A straight line may be defined by two endpoints and an equation. The two endpoints are described by x1, y1 and x2, y2. The equation of the line is used to describe the x, y coordinates of all the points that lie between these two endpoints.
By scan-converting these calculated x, y values, we represent the line as a sequence on pixels. While this method of scan-converting a straight line is adequate for many graphics applications, interactive graphics systems require a much faster response than the method described above can provide. Interactive graphics is a graphics system in which the user dynamically controls the presentation of graphics models on a computer display.
While this approach is mathematically sound, it involves floating-point computation multiplication and addition in every step that uses the line equation since m and b are generally real numbers.
The challenge is to find a way to achieve the same goal as quickly as possible. DDA Algorithm This algorithm works on the principle of obtaining the successive pixel values based on the differential equation governing the line.
Since screen pixels are referred with integer values, or plotted positions, which may only approximate the calculated coordinates — i. Standard algorithms are available to determine which pixels provide the best approximation to the desired line, one such algorithm is the DDA Digital Differential Analyser algorithm. Before going to the details of the algorithm, let us discuss some general appearances of the line segment, because the respective appearance decides which pixels are to be intensified.
It is also obvious that only those pixels that lie very close to the line path are to be intensified because they are the ones which best approximate the line.
Apart from the exact situation Dr. Which is the case shown in Figure above. In Figure, there are two lines. Now let us discuss the general mechanism of construction of these two lines with the DDA algorithm.
So, in Case 1 i. So, in Case 2, i. Note: 1 If in case 1, we plot the line the other way round i. In this case, every time we look for the x pixel, it will provide more than one choice of pixel and thus enhances the defect of the stair case effect in line generation. Additionally, from the Figure above, you may notice that in the other way round strategy for plotting line 1, the vertical span is quite less in comparison to the horizontal span.
Thus, a lesser number of pixels are to be made ON, and will be available if we increase Y in unit step and approximate X. But more pixels will be available if we increase X in unit steps and approximate Y this choice will also reduce staircase effect distortion in line generation therefore more motion is to be made along x- axis.
It is to be noted that while calculating yi , if yi turned out to be a floating number then we round its value to select the approximating pixel. This rounding off feature contributes to the staircase effect. Thus, we need to increment X in unit steps and approximate Y. Similarly, for case 2, let us sum up our discussion on DDA algorithm for both cases. We will examine each case separately.
For case 1, increase x by one Unit every time, for case 2 increase y by one Unit every time and approximate respective values of y and x. A pixel is plotted at the starting coordinate of the line, and each iteration of the algorithm increments the pixel one unit along the major, or x-axis.
The pixel is incremented along the minor, or y-axis, only when a decision variable based on the slope of the line changes sign.
Read this topic. Thread Tools Show Printable Version. Gender: : Female City : Other. Multimedia notes Pdf Free Download Chapter wise pdf notes on multimedia. I hope it will help you and you will learn more from these pdf ebook. Attached Files for Direct Download. Chapter 3 - Graphics and Image Data Representations. Chapter 4 - Color in Image and Video.
Chapter 5 - Fundamental Concepts in Video. Chapter 6 - Basics of Digital Audio. Chapter 7 - Lossless Compression Algorithms. Last edited by jaivinder; 5th July at PM.
0コメント