Computer Graphics - Short Question Answer
Here in this section of Computer Graphics Short Questions Answers, We have listed out some of the important Short Questions with Answers which will help students to answer it correctly in their University Written Exam.
1. What do you mean by scan conversion?
A major task of the display processor is digitizing a picture definition given in an application program into a set of pixel intensity values for storage in the frame buffer. This digitization process is called scan conversion.
2. Explain the merits and demerits of Penetration techniques.
The merits and demerits of the Penetration techniques are as follows;
- It is an inexpensive technique
- It has only four colors
- The quality of the picture is not good when it is compared to other techniques
- It can display color scans in monitors
3. Explain the merits and demerits of DVST.
The merits and demerits of direct view storage tubes [DVST] are as follows;
Merits
- It has a flat screen
- Refreshing of screen is not required
- Selective or part erasing of screen is not possible
- It has poor contrast
- Performance is inferior to the refresh
Demerits
- They normally never display colour.
- Selected part of picture never removed.
- It can take quite a few seconds for composite pictures while redrawing and erasing process.
DVST stands for Direct View Storage Tube. It is one of the display devices in which an electron flood gun and writing gun is present. The flood gun floods electrons to a wire grid on which already the writing gun has written some image.
The electrons from the flood gun will be repelled back by the negatively charged wire grid which has been charged so by the writing electron beam. The part of the wire grid which has not been charged -ve will allow the electrons to pass through and the electrons will collide on the screen and produce the image.
4. Explain the merits and demerits of Plasma panel display.
ADVANTAGES:
- Refreshing is not required
- Produce a very steady image free of Flicker
- Less bulky than a
DISADVANTAGES:
- Poor resolution of up to 60 p.i
- It requires complex addressing and wiring
- It is costlier than
5. What is the difference between impact and non-impact printers?
Impact printers press formed character faces against an inked ribbon on to the paper. A line printer and dot-matrix printer are examples.
Non-impact printer and plotters use Laser techniques, inkjet sprays, Xerographic process, electrostatic methods and electro thermal methods to get images onto the papers.
Examples are: Inkjet/Laser printers.
6. What is the features of Inkjet printers?
The features of Inkjet printers are:
- They can print 2 to 4 pages/minutes.
- Resolution is about 360d.p.i. Therefore better print quality is
- The operating cost is very low. The only part that requires replacement is ink
- 4 colors cyane, yellow, majenta, black are available.
7. What are the advantages of laser printers?
Advantage of laser printers are as follow:
- High speed, precision and economy.
- Cheap to maintain.
- Quality
- Lasts for longer
- Toner power is very
8. What is the advantages of electrostatic plotters?
Advantages of electrostatic plotters are:
- They are faster than pen plotters and very high quality printers.
- Recent electrostatic plotters include a scan-conversion capability.
- Color electrostatic plotters are available. They make multiple passes over the paper to plot color pictures.
9. Consider three different raster systems with resolutions of 640 x 480, 1280 x 1024, and 2560 x 2048
a) What size is frame buffer (in bytes) for each of these systems to store 12 bits per pixel?
Solution:
Because eight bits constitute a byte, frame-buffer sizes of the systems are as follows:
640 x 480 x 12 bits / 8 = 450KB;
1280 x 1024 x 12 bits / 8 = 1920KB;
2560 x 2048 x 12 bits / 8 = 7680KB;
b) How much storage (in bytes) is required for each system if 24 bits per pixel are to be stored?
Similarly, each of the above results is just doubled for 24 (12×2) bits of storage per pixel.
10. Consider two raster systems with the resolutions of 640 x 480 and 1280 x 1024.
Consider two raster systems with the resolutions of 640 x 480 and 1280 x 1024.
a) How many pixels could be accessed per second in each of these systems by a display controller that refreshes the screen at a rate of 60 frames per second?
Solution:
Since 60 frames are refreshed per second and each frame consists of 640 x 480 pixels,
the access rate of such a system is (640 x 480) * 60 = 1.8432 x 107 pixels/second.
Likewise,
for the 1280 x 1024 system, the access rate is (1280 x 1024) * 60 = 7.86432 x
107 pixels/second.
b) What is the access time per pixel in each system?
Solution:
According to the definition of access rate, we know that the access time per pixel should be 1/(access rate).
Therefore, the access time is around 54 nanoseconds/pixel for the 640 x 480 system,
and the access time is around 12.7 nanoseconds/pixel for the 1280×1024 system.
11. What is the minimum amount of video RAM that the computer must have to support the above-mentioned resolution and number of colors?
Consider a raster system with the resolution of 1024 x 768 pixels and the color palette calls for 65,536 colors.
What is the minimum amount of video RAM that the computer must have to support the above-mentioned resolution and number of colors?
Solution:
Recall that the color of each pixel on a display is represented with some number of bits. Hence, a display capable of showing up to 256 colors is using 8 bits per pixels (i.e. “8-bit color”).
Notice first that the color palette calls for 65,536 colors. This number is but 216 , which implies that 16 bits are being used to represent the color of each pixel on the display.
The display’s resolution is 1024 by 768 pixels, which implies that there is a total of 786,432 (1024 × 768) pixels on the display.
Hence, the total number of bits required to display any of 65,536 colors on each of the screen’s 786,432 pixels is 12,582,912 (786,432 × 16).
Dividing this value by 8 yields an answer of 1,572,864 bytes. Dividing that value by 1,024 yields an answer of 1,536 KB. Dividing that value by 1,024 yields an answer of 1.5 MB.
12. How Many k bytes does a frame buffer needs in a 600 x 400 pixel ?
How Many k bytes does a frame buffer needs in a 600 x 400 pixel ?
Solution:
13. Find out the aspect ratio of the raster system using 8 x 10 inches screen and 100 pixel/inch.
Solution:
14. How much time is spent scanning across each row of pixels during screen refresh on a raster system with resolution of 1280 X 1024 and a refresh rate of 60 frames per second?
How much time is spent scanning across each row of pixels during screen refresh on a raster system with resolution of 1280 X 1024 and a refresh rate of 60 frames per second?
Solution:
Here, resolution = 1280 X 1024
That means system contains 1024 scan lines and each scan line contains 128 pixels refresh rate = 60 frame/sec.
So, 1 frame takes = 1/60 sec. Since resolution = 1280 X 1024
1 frame buffer consist of 1024 scan lines
It means then 1024 scan lines takes 1/60 sec Therefore, 1 scan line takes ,
1 / 60 X 1024
Sec = 0.058 sec
15. Suppose RGB raster system is to be designed using on 8 inch X 10 inch screen with a resolution of 100 pixels per inch in each direction.
Suppose RGB raster system is to be designed using on 8 inch X 10 inch screen with a resolution of 100 pixels per inch in each direction.
If we want to store 6 bits per pixel in the frame buffer, how much storage (in bytes) do we need for frame buffer?
Solution:
Here, resolution = 8 inch X 10 inch
First, we convert it in pixel then
Now resolution = 8 X 100 by 10 X 100 pixel = 800 X 1000 pixel
1 pixel can store 6 bits
So, frame buffer size required = 800 X 100 X 6 bits
Bytes = 6 x 105 bytes.
16. A unit square is transformed by 2 x 2 transformation matrix. what is the transformation matrix?
A unit square is transformed by 2 x 2 transformation matrix. The resulting position vector are :-
0 |
2 |
8 |
6 |
, what is the transformation matrix? |
0 |
3 |
4 |
1 |
|
Solution:
Suppose the unit square have coordinates
(x, y)
(x+1, y)
(x+1, y+1)
(x, y+1)
17. Show that the 2 X 2 matrix represents pure rotation.
Show that the 2 X 2 matrix
represents pure rotation.
Solution:
We know that for pure rotational transformation determinant of the transformation matrix is always equal to 1.
18. Prove that simultaneous shearing in both direction (X & y direction) is not equal to the composition of pure shear along x-axis followed by pure shear along y-axis.
Prove that simultaneous shearing in both direction (X & y direction) is not equal to the composition of pure shear along x-axis followed by pure shear along y-axis.
Solution:
19. Use the Cohen Sutherland algorithm to clip line P1 (70,20) and p2(100,10) against a window lower left hand corner (50,10) and upper right hand corner (80,40).
Use the Cohen Sutherland algorithm to clip line P1 (70,20) and p2(100,10) against a window lower left hand corner (50,10) and upper right hand corner (80,40).
Solution:
Given, P1(70,20) and p2(100,10)
Window lower left corner = (50,10)
Window upper right corner = (80,40)
Now, we assign 4 bits binary out code.
Point P1 is inside the window so the out code of P1 = 0000 and the out code for P2 = 0010.
Logical AND operation will give, 0000
20. What is the access time per pixel in each system?
What is the access time per pixel in each system?
The access time per pixel = 1/ access rate.
The access time is around 54 nanoseconds/pixel for the 640 x 480 system,
The access time is around 12.7 nanoseconds/pixel for the 1280×1024 system.
21. Consider a raster system with the resolution of 1024 x 768 pixels and the color palette calls for 65,536 colors.
Consider a raster system with the resolution of 1024 x 768 pixels and the color palette calls for 65,536 colors. What is the minimum amount of video RAM that the computer must have to support the above-mentioned resolution and number of colors?
Solution:
No of Colors = 65,536 colors
Number of bits per pixel = log 2 (65,536) =16-bit color.
The display’s resolution is 1024X768 pixels
Total Number of pixels = 786,432 (1024 × 768) pixels.
The total number of bits required = 786,432 × 16 = 12,582,912 Bits = 1,572,864 bytes = 1,536 KB = 1.5 MB
22. What is an output primitive?
Graphics programming packages provide function to describe a scene in terms of these basic geometric structures, referred to as output primitives.
23. What is point in the computer graphics system?
The point is a most basic graphical element & is completely defined by a pair of user coordinates (x , y).
24. What is Transformation in Computer Graphic?
Transformation is the process of introducing changes in the shape size and orientation of the object using scaling rotation reflection shearing & translation etc.
25. Write short notes on active and passive transformations?
Active Transformation
In the active transformation the points x and x| represent different coordinates of the same coordinate system. Here all the points are acted upon by the same transformation and hence the shape of the object is not distorted.
Passive Transformation
In a passive transformation the points x and x| represent same points in the space but in a different coordinate system. Here the change in the coordinates is merely due to the change in the type of the user coordinate system.
26. What is translation in computer graphic?
The transformation is:
x| = x + tx ;
y| = y+ty
27. What is rotation in computer graphic?
A 2-D rotation is done by repositioning the coordinates along a circular path, in the x-y plane by making an angle with the axes. The transformation is given by: X| = r cos (θ + φ) and Y| = r sin (θ + φ).
28. What is scaling in computer graphic?
The scaling transformations changes the shape of an object and can be carried out by multiplying each vertex (x,y) by scaling factor Sx,Sy where Sx is the scaling factor of x and Sy is the scaling factor of y.
29. What is shearing?
The shearing transformation actually slants the object along the X direction or the Y direction as required.ie; this transformation slants the shape of an object along a required plane.
30. What is reflection?
The reflection is actually the transformation that produces a mirror image of an object. For this use some angles and lines of reflection.
31. What do you mean by computer graphics?
The branch of science and technology concerned with methods and techniques for converting data to or from visual presentation using computers.
- Create an image.
- Store the image in the memory.
- Display the image on display device.
- Make a processing on the image.
- Interact with the image.
32. What are the applications of computer graphics?
- Computer Aided Design
- Graphical User Interface
- Entertainment
- Simulation and Training
- Education and Presentation
- Computer Generated Art
- Scientific Visualization
- Image Processing
- Virtual reality
33. What can the programmer do in computer graphics?
- Develop the geometric representation for the geometric objects of the images.
- Assemble these objects into an appropriate geometric space.
- Specify how the scene is to be viewed and how it will be displayed on the graphic device.
- Define some animation for the image.
- Design a ways for the user to interact with the scene as it is presented.
34. How can the computer graphics used in solving problems?
GC can solve a lot of problems:
- Identifying a problem.
- Building the model.
- Represent the problem geometrically and create an image.
- Use the image to understand the problem and try find a possible solution.
35. Computer Graphics API
Graphic API’s is a set of tools that allow a programmer to write applications that include the use of interactive computer graphics without dealing with system details for tasks such as window handling and interactions.
36. What do you mean by GUI?
GUI stands for Graphical user interface. A major component of a GUI is a window manager that allows a user to display multiple-window areas. To make a particular window active we simply click in that window using an interactive pointing device. Interfaces also display menus and icons for fast selection of processing options or parameter values.
37. What does it mean by RGB?
The RGB is a color model, in which red, green, and blue light are added together in various ways to reproduce a different array of colors. The name of the model comes from the initials of the three additive primary colors, red, green, and blue.
38. Define refresh buffer/Frame buffer?
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.
39. Define Pixel.
Each screen point is referred to as a pixel or pel (Picture element).
40. Define bitmap.
On a black and white system with one bit per pixel, the frame buffer is commonly known as a bitmap.
41. What is the role of a video controller?
It is used to control the operation of the display device by accessing the frame buffer to refresh the screen.
42. Define Graphics controller /Display controller/Display processor.
The purpose of the display processor is to free the CPU from graphic chores. A major task of the display processor is digitizing a picture definition given in an application program into a set of pixel intensity values for storage in the frame buffer.
43. What do you mean by scan conversion?
A major task of the display processor is digitizing a picture definition given in an application program into a set of pixel intensity values for storage in the frame buffer. This digitization process is called scan conversion.
44. Memory mapping
The status of each pixel on the screen was stored in a memory location (memory mapped display).
- Each pixel is numbered sequentially.
- By writing values to the correct locations in memory the appearance of the screen can be con.
- Find out if a trolled by a programmer.
- A program can pixel is turned on or off.
45. Give an example of memory mapping for 5 X 5 resolution color display device?
46. Describe the Basic Components of computer graphics system?
- A computer graphics system is a computer system; that have all the components of a general-purpose computer system
- There are six major elements in our system:
- Input devices
- Central Processing Unit
- Graphics Processing Unit
- Memory
- Frame buffer
- Output devices
47. Differentiate between raster and random scan displays.
raster scan displays |
random scan displays |
The electron beam is swept across the screen, one row at a time from top to bottom. |
The electron beam is directed to the parts of the screen where a picture is to be drawn. |
48. What is the difference between raster storage image and vector storage image?
Raster Image:
The images is considered as rectangular arrays of pixels, each pixel have different colors stored as three numbers, for RGB. In a Monochrome system [black-and-white], each screen point is either on (a bit value of 1) or off (a bit value of 0), so only one bit per pixel is needed to store the intensity of screen positions.
Vector Image:
The image is stored as a set of instructions for displaying the.
- Are often used for text, diagrams, mechanical drawings, and other applications where precision are important and photographic images and complex shading aren’t needed.
49. List the operating characteristics for the video display systems based on the CRT technology?
- A beam of electrons emitted by an electron gun, passes through focusing System and deflection systems that direct the beam toward specified positions on the phosphor-coated screen.
- The phosphor-coated screen then emits a small spot of light at each position contacted by the electron beam.
- The light emitted by the phosphor fades very rapidly, the picture is redrawn by quickly directing the electron beam back over the same points. This type of display is called a refresh CRT.
50. Define persistence in terms of CRT Phosphorous.
Persistence is the one of the major property of phosphorous used in CRT’s. It means how long they continue to emit light after the electron beam is removed.
51. Define resolution.
The maximum number of points that can be displayed without overlap on a CRT monitor.
52. What do you mean by an aspect ratio?
Aspect ratio is the ratio of vertical points to horizontal points necessary to produce equal length lines in both directions on the screen. An aspect ratio of ¾ means that a vertical line plotted with three points has same length as a horizontal line plotted with 4 points.
53. What are the different properties of phosphorus?
- Color
- Persistence
54. What are the different types of Flat-Screens, and what is the difference between them?
- light-emitting diodes (LEDs) - light-emitting diodes that can be turned on and off
- liquid-crystal displays (LCDs) - polarization of the liquid crystals in the middle panel
- plasma panels - voltages on the grids to energize gases
- Similarities:
- All use a two-dimensional grid to address individual light-emitting
- The two outside plates each contain perpendicular parallel grids of wires .
- Sending electrical signals to a wire in each grid, generates electrical field at the
Intersection of two wires, can control the corresponding element in the middle plate.
55. What do you mean by retracing? Define horizontal as well as vertical retracing.
Retracing:
At the end of each scan line, the electron beam returns to the left side of the screen to begin displaying the next scan line.
Horizontal retrace
The return to the left of the screen, after refreshing each scan line.
Vertical retrace
At the end of each frame, the electron beam returns to the top left corner of the screen to begin the next frame.
56. What do you mean by interlacing?
It is the method of incrementally displaying a visual on a CRT. On some raster scan systems, each frame is displayed in two passes using an interlaced refresh procedure. In the first pass, the beam seeps across every other scan line from top to bottom. Then after the vertical retrace, the beam sweeps out the remaining scan lines.
57. What is a Beam penetration method?
This technique is used in random scan display systems. Two layers of phosphor (red and green) are coated onto the inside of the CRT screen, the displayed colors depends on how far the electron beam penetrates into the phosphors layers. A slow electron beam excites only the outer red layer. A very fast electron beam penetrates trough the red layer and hence excites the green layer. An average electron beam gives the combination of red and green color. That is yellow and orange. This technique only provides four colors.
58. Define shadow masking.
This technique is used in raster scan display devices. It gives more colors than a beam penetration method.
A shadow Mask CRT has three phosphor color dots at each pixel location (red light, green light and blue light.
This type of CRT also has three electron guns one for each color dot.
A shadow mask grid is installed just behind the phosphor coated screen.
When the three beams pass through a hole in the shadow mask, they activate a dot triangle, which appears as a small color spot on the screen.
More than 17 million different colors can be obtained in a full color system.
59. What are the different types of Flat-Screens, and what is the difference between them?
- light-emitting diodes (LEDs) - light-emitting diodes that can be turned on and off
- liquid-crystal displays (LCDs) - polarization of the liquid crystals in the middle panel
- plasma panels - voltages on the grids to energize gases
- Similarities:
- All use a two-dimensional grid to address individual light-emitting elements.
- The two outside plates each contain perpendicular parallel grids of wires.
- Sending electrical signals to a wire in each grid, generates electrical field at the Intersection of two wires, can control the corresponding element in the middle plate.
60. What are the popular image storage formats?
- Jpeg format. This Lossy format compresses image blocks based on thresholds in the human visual This format works well for natural images.
- Tiff format. This format is most commonly used to hold binary images or lossless compressed 8- or 16-bit RGB although many other options exist.
- Ppm format. A lossless, uncompressed format is most often used for 8-bit RGB images although many options exist.
- Png format. This is a set of lossless formats with a good set of open source management tools.
61. Consider three different raster systems with resolutions of 640 x 480, 1280 x 1024, and 2560 x 2048.
a) What size is frame buffer (in bytes) for each of these systems to store 12 bits per pixel?
Because eight bits constitute a byte, frame-buffer sizes of the systems are as follows: 640 x 480 x 12 bits / 8 = 450KB;
1280 x 1024 x 12 bits / 8 = 1920KB;
2560 x 2048 x 12 bits / 8 = 7680KB;
b) How much storage (in bytes) is required for each system if 24 bits per pixel are to be stored?
Similarly, each of the above results is just doubled for 24 (12×2) bits of storage per pixel.
62. Consider two raster systems with the resolutions of 640 x 480 and 1280 x 1024.
a. How many pixels could be accessed per second in each of these systems by a display controller that refreshes the screen at a rate of 60 frames per second?
Since 60 frames are refreshed per second.
Each frame consists of 640 x 480 pixels,
- The access rate of such a system = (640 x 480) * 60 = 1.8432 x 107 pixels/second.
For the 1280 x 1024 system,
- The access rate is (1280 x 1024) * 60 = 86432 x 107 pixels/second.
b. What is the access time per pixel in each system?
The access time per pixel = 1/ access rate.
The access time is around 54 nanoseconds/pixel for the 640 x 480 system,
The access time is around 12.7 nanoseconds/pixel for the 1280×1024 system.
63. Consider a raster system with the resolution of 1024 x 768 pixels and the color palette calls for 65,536 colors. What is the minimum amount of video RAM that the computer must have to support the above-mentioned resolution and number of colors?
No of Colors = 65,536 colors
Number of bits per pixel = log 2 (65,536) =16-bit color.
The display’s resolution is 1024X768 pixels
Total Number of pixels = 786,432 (1024 × 768) pixels.
The total number of bits required
= 786,432 × 16 = 12,582,912 Bits = 1,572,864 bytes = 1,536 KB = 1.5 MB
64. How Many k bytes does a frame buffer needs in a 600 x 400 pixel?
65. How much time is spent scanning across each row of pixels during screen refresh on a raster system with resolution of 1280 X 1024 and a refresh rate of 60 frames per second?
Resolution = 1280 X 1024
That means system contains 1024 scan lines and each scan line contains 128 pixels Refresh rate = 60 frame/sec.
1 frame takes = 1/60 sec = 0.01666 sec.
1 frame buffer consist of 1024 scan lines (It means then 1024 scan lines takes 0.01666 sec) 1
1 scan line takes = 0.01666 /1024 = 10.6 𝜇sec
66. Suppose RGB raster system is to be designed using on 8 inch X 10 inch screen with a resolution of 100 pixels per inch in each direction. If we want to store 6 bits per pixel in the frame buffer, how much storage (in bytes) do we need for frame buffer?
Suppose RGB raster system is to be designed using on 8 inch X 10 inch screen with a resolution of 100 pixels per inch in each direction. If we want to store 6 bits per pixel in the frame buffer, how much storage (in bytes) do we need for frame buffer?
Solution
Resolution = 8 inch X 10 inch (100 pixels per inch)
Resolution = 8 X 100 by 10 X 100 pixel = 800 X 1000 pixel
1 pixel can be stored in 6 bits
Frame buffer size = 800 X 100 X 6 bits = 100 X 100 X 6 Byte
67. Find out the aspect ratio of the raster system using 8 x 10 inches screen and 100 pixel/inch.
68. Consider three different raster systems with resolutions of 640 by 480, 1280 by 1024, and 2560 by 2048. What size frame buffer (in bytes) is needed for each of these systems to store 12 bits per pixel? How much storage is required for each system if 24 bits per pixel are to be stored?
Frame-buffer size for each of the systems is
640 × 480 × 12 bits ÷ 8 bits per byte = 450 KB
1280 × 1024 × 12 bits ÷ 8 bits per byte = 1920 KB
2560 × 2048 × 12 bits ÷ 8 bits per byte = 7680 KB
For 24 bits of storage per pixel, each of the above values is doubled.
900 KB & 3840 KB & 15360 KB
69. How long does it take to load a 640-by-480 frame buffer with 12 bits per pixel, if 105 bits can be transferred per second?
Let X the time that will be taken to load a 640-by-480 frame buffer with 12 bits per pixel.
Number of bits = 640 * 480 * 12 = 3686400 bits
1 sec X 105 bits
X sec(s) X 3686400 bits
Then X = 3686400/105 = 36.864 second
70. How much time is spent in scanning across each row of pixels during screen refresh on a raster system with a resolution of 1280 by 1024 and refresh rate of 60 frames per second?
The time required for scanning one frame is 1/60 = 0.01666
One frame has 1024
The time of scanning on row = 0.01666 / 1024 = 1.627 * 10-5 sec
71. Suppose we have a video monitor with a display area with 12 inches width and 9.6 inches high. If the resolution is 1280 X 1024 and the aspect ratio is 1, what are the width and the height of each point on the screen?
72. How long would it take to load a 640-by-480 frame buffer with 12 bits per pixel, if 105 bits can be transferred per second? How long would it take to load a 24-bit-per- pixel frame buffer with a resolution of 1280 by 1024 using this same transfer rate?
How long would it take to load a 640-by-480 frame buffer with 12 bits per pixel, if 105 bits can be transferred per second? How long would it take to load a 24-bit-per- pixel frame buffer with a resolution of 1280 by 1024 using this same transfer rate?
Solution
Total number of bits for the frame = 640 x 480 x 12 bits = 3686400 bits
The time needed to load the frame buffer = 3686400 / 105 sec = 36.864 sec
Total number of bits for the frame = 1280 x 1024 x 24 bits = 31457280 bits
The time needed to load the frame buffer = 31457280 / 105 sec = 314.5728 sec
73. Suppose an RGB raster system is to be designed using an 8-inch by 10-inch screen with a resolution of 100 pixels per inch in each direction. If we want to store 6 bits per pixel in the frame buffer, how much storage bytes do we need for the frame buffer?
74. How can an application program actually draw something on screen?
75. Describe what is performed by the following functions:
- Setpixel(x, y, color) - Sets the pixel at position (x, y) to the given color.
- Getpixel(x, y): Gets the color at the pixel at position (x, y).
76. For the brute force line drawing algorithm:
- Analyze the Basic concept of drawing a line using the brute force algorithm?
77. Write pseudo code for applying the algorithm
Write pseudo code for applying the algorithm
78. Using the Brute force algorithm to digitize a line with end points (20, 10) and (26, 14).
79. Digitize a line with end points (20, 10) and (30, 18).
80. Write the algorithm of the line drawing algorithm using Digital Differential Analyzer (DDA).
81. Using the DDA algorithm digitize a line with end points (10,15) and (15,30).
82. Digitize a line with end points (20, 10) and (30, 18) using DDA line drawing Algorithm.
Digitize a line with end points (20, 10) and (30, 18) using DDA line drawing Algorithm.
83. Implement the DDA algorithm to draw a line from (0,0) to (6,6). M=(6-0)/(6-0)=6/6 =1 XK+1=Xk+1 YK+1=Yk+m = Yk+1 Xk=0 Yk=0
84. The process of drawing circle using Brute force method can be enhanced by taking greater advantage of the symmetry in a circle. Write the complete algorithm used to apply this enhancement.
85. Derive the homogenous matrices to represent the following transformation
Translation - Rotation about the origin – Scaling
86. A triangle is defined by Find the transformed coordinates after the following transformation a. 90o rotation about origin. b. Reflection about line y = -x.
A triangle is defined by Find the transformed coordinates after the following transformation
- 90o rotation about origin.
- Reflection about line y = -x.
87. Translate the square ABCD whose co-ordinate are A(0,0), b(3,0), C(3,3), D(0,3) by 2 units in both direction and then scale it by 1.5 units in x direction and 0.5 units in y direction.
Answer:
a (- 2 , - 2) , b (5 , -2) , c (5 , 5) , d ( - 2 , 5)
( - 2 , -2) , b (8.5 , -2) , c( 8.5 , 1.5) , (-2 , 1.5)
Step-by-step explanation:
Translate the square abcd whose coordinates are a(0,0), b(3,0), c(3,3), d(0,3) by 2 units in both direction and then scale it by 1.5 units in x direction and 0.5 units in y direction.
square abcd whose coordinates are a(0,0), b(3,0), c(3,3), d(0,3)
Translate by 2 units in both direction & in both axis
a (- 2 , - 2) , b (5 , -2) , c (5 , 5) , d ( - 2 , 5)
Scaling 1.5 times in x direction Keeping left constant And 0.5 units in y direction Keeping bottom constant
( - 2 , -2) , b (8.5 , -2) , c( 8.5 , 1.5) , (-2 , 1.5)
88. Perform a 45o rotation of a triangle A(0,0, B(1,1), C(5,2) a. About the origin. b. About the point p(-1,-1)
89. Find the transformation matrix that transforms the square ABCD whose center is at (2, 2) is reduced to half of its size, with center still remaining at (2, 2). The coordinate of square ABCD are A (0, 0), B (0, 4), C (4, 4) and D (4, 0). Find the co-ordinate of new square.
Ans. (HINT: - After scaling the square to half of its size, the new translated square will have center at (1, 1) so, translate again the new square by (1, 1), so that center again reach to (2, 2).)
90. Consider the square A (1, 0), B (0, 0), C (0, 1), D (1, 1). Rotate the square ABCD by 45 degree clockwise about A (1, 0).
HINT:-
- First, translate the square by Tx= -1 and Ty=0.
- Then rotate the square by 45 degree.
- Again translate the square by TX=1 and Ty=0.
91. Magnify the triangle with vertices A (0, 0), B (1, 1) and C (5, 2) to twice its size while keeping C (5, 2) fixed.
Ans. HINT:-
- First, translate the triangle by Tx= -5 and Ty=-2
- Then magnify the triangle by twice its size
- Again translate the triangle by Tx= 5 and Ty=2.
92. Explain the algorithms for line drawing.
The Line Drawing Algorithm is a graphical algorithm for representing line segments on discrete graphical media, such as printers and pixel-based media.”
A line drawing algorithm is a method for estimating a line segment on discrete graphical media such as pixel-based screens and printers in computer graphics. Line sketching on such media necessitates an approximation (in nontrivial cases). Lines are rasterised in one colour using basic methods. Spatial anti-aliasing is a sophisticated approach that allows for a better representation of numerous colour gradations.
To draw a line on a continuous medium, however, no algorithm is required. Cathode-ray oscilloscopes, for example, use analogue phenomena to create lines and curves.
The formula for a slope line interception is:
Y = mx + b
In this formula, m is the slope line and b is the line’s intercept of y. Two endpoints for the line segment are supplied in coordinates (x1, y1) and (x2, y2).
Properties of a Line Drawing Algorithm
These Algorithm has the following characteristics.
Input: At least one or more inputs must be accept a good algorithm.
Output: At least one output must produced an algorithm.
An algorithm should be precise: The algorithm’s each step must well-define.
Finiteness: Finiteness is require in an algorithm. It signifies that the algorithm will come to a halt once all of the steps have been complete.
Correctness: An algorithm must implemented correctly.
Uniqueness: The result of an algorithm should be based on the given input, and all steps of the algorithm should be clearly and uniquely defined.
Effectiveness: An algorithm’s steps must be correct and efficient.
Easy to understand: Learners must be able to understand the solution in a more natural way thanks to an algorithm.
Types of Line Drawing Algorithm
For drawing a line, the following algorithms are use:
DDA (Digital Differential Analyzer) Line Drawing Algorithm
Bresenham’s Line Drawing Algorithm
Digital Differential Algorithm ( DDA)
A DDA Algorithm, also known as a Digital Differential Algorithm, is an incremental conversion method. Moreover, The usage of the results from the preceding stage in each calculation distinguishes this method.
Advantages of Digital Differential Analyzer
Firstly, It’s a straightforward algorithm to implement.
The direct line equation is a slower algorithm.
In the Digital Differential Analyzer, we are unable to apply the multiplication approach.
When a point changes its location, the Digital Differential Analyzer method alerts us about the overflow.
DDA Algorithm Limitations
Firstly, It takes a long time to do floating point arithmetic and rounding points.
A round-off mistake may cause the measured pixel location to deviate from the true long-line segment path.
The Bresenham Line Algorithm
In 1962, “Jack Elton Bresenham” proposed this algorithm. This algorithm aids in the conversion of a line’s scan. It’s a strong, useful, and precise method. Furthermore, To draw a line, we employ incremental integer calculations. Addition, subtraction, and multiplication are among the integer calculations.
In addition, We must determine the slope (m) between the starting point and the final point in Bresenham’s Line Drawing procedure.
Advantages of Bresenham’s Line Drawing Algorithm
The following are the benefits of the Bresenham line algorithm:
- An incremental algorithm that is quick.
- Only integer computations are used in this.
Disadvantages of Bresenham’s Line Drawing Algorithm
Bresenham’s Line Drawing Algorithm only aids in the creation of fundamental lines.
The drawn line is not smooth as a result.
93. Explain Liang‐Barsky line clipping algorithm.
Liang and Barsky have established an algorithm that uses floating-point arithmetic but finds the appropriate endpoints with at most four computations. This algorithm uses the parametric equations for a line and solves four inequalities to find the range of the parameter for which the line is in the viewport.
Let P(x1, y1), Q(x2, y2) is the line which we want to study. The parametric equation of the line segment from gives x-values and y-values for every point in terms of a parameter that ranges from 0 to 1. The equations are
x=x1+(x2-x1 )*t=x1+dx*t and y=y1+(y2-y1 )*t=y1+dy*t
We can see that when t = 0, the point computed is P(x1, y1); and when t = 1, the point computed is Q(x2, y2).
94. List the operating characteristics for the following display technologies :(a) raster systems (b) vector systems(c) plasma panels (d)LCDs
Raster Refresh systems:
Electron beam is swept across the screen, one row at time, from top to bottom. Each row is referred to as a scan line. As the electron beam moves across a scan line, the beam intensity turns on and off to create a pattern of illuminated spots.
Vector Refresh Systems:
The system cycles through the set of commands in the display file, drawing each component line in turn. After all line drawing commands have been processed, the system cycles back to the first command in the list.
Plasma Panels:
Constructed by filling the region between two glass panels with a mixture of gases that usually includes neon, a series of vertical conducting ribbons is placed on one gas panel and a set of horizontal conducting ribbons is built into the other glass panel.
LCDs:
Operating by producing a picture by passing polarized light from the surroundings or from an internal light source through a liquid-crystal material that can be aligned to either block or transmit the light.
95. What is polygon clipping?
Polygon is a representation of the surface. It is primitive which is closed in nature. It is formed using a collection of lines. It is also called as many-sided figure. The lines combined to form polygon are called sides or edges. The lines are obtained by combining two vertices.
Example: Triangle, Rectangle, Hexagon, Pentagon
96. Write a neat block diagram, explain the architecture of a raster display
Raster Scan Display basically employs a Cathode Ray Tube (CRT) or an LCD panel for display. The CRT works just like the picture tube of a television set. Raster Scan Display viewing surface is coated with a layer of arrayed phosphor dots. At the back of the CRT is a set of electron guns (cathodes) that produce a controlled stream of electrons that says electron beam. The phosphor material emits light when struck by these high-energy electrons. The Architecture of Raster and Random Scan Display Devices Diagram is given below:
97. Write a short notes on a) Reflection b) shearing transformation.
a) Reflection:
The reflection is just like the mirror image of the original image. The mirror image can be either about the x-axis or the y-axis. In the reflection process, the size of the object does not change. We can also say that the reflection is a kind of rotation where the angle of rotation is 180 degrees, while the reflected object is always formed on the other side of the mirror and the size of the reflected image is the same as the size of the original image.
We can see reflection of object in these four ways:
Reflection along X-axis
Reflection along Y-axis
Reflection along the line(x=y)
Reflection perpendicular to XY-axis
Now let us understand reflection with the help of an example,
Example:
Problem Statement: Given a triangle with coordinate points A (3, 4), B (6, 4), C (5, 6). Apply the reflection on the X-axis and obtain the new coordinates of the object.
Solution:
Given -
Old corner coordinates of the triangle = A (3, 4), B (6, 4), C (5, 6)
Reflection has to be taken on the X-axis
For the co-ordinates A (3, 4)
Let the new co-ordinates of corner A after reflection be = (Xnew, Ynew).
When we apply the reflection equations, we get:
Xnew = Xold = 3
Ynew = -Yold = -4
Thus, the new co-ordinates of corner A after reflection is = (3, -4).
For the co-ordinates B (6, 4)
Let the new co-ordinates of corner B after reflection be = (Xnew, Ynew).
When we apply the reflection equations, we get-
Xnew = Xold = 6
Ynew = -Yold = -4
Thus, the new co-ordinates of corner B after reflection is = (6, -4).
For the co-ordinates C (5, 6)
Let the new coordinates of corner C after reflection be = (Xnew, Ynew).
When we apply the reflection equations, we get-
Xnew = Xold = 5
Ynew = -Yold = -6
Thus, the new co-ordinates of corner C after reflection is = (5, -6).
Thus, the new co-ordinates of the triangle after reflection will be = A (3, -4), B (6, -4), C (5, -6).
b) Shearing
Shearing is the transformation of an object which changes the shape of the object. The shearing can be in one direction or two directions. It is an ideal technique to change the shape of an existing figure. The sliding of layers of the object occurs while doing the same. Shearing can be done in three ways,
Shearing in the X-direction
Shearing in the Y-direction
Shearing in the X-Y direction
Shearing in X axis can be done using this equation,
Xnew = Xold + Shx x Yold
Ynew = Yold
Shearing in Y axis can be done using this equation,
Xnew = Xold
Ynew = Yold + Shy x Xold
Now let us understand shearing more clearly with the help of an example,
Example:
Problem Statement: Given a triangle with points A (1, 1), B (0, 0) and C (1, 0). You need to apply shear parameter 2 on the X-axis and 2 on Y-axis and find out the new coordinates of the object.
Solution:
Given-
Old corner co-ordinates of the triangle = A (1, 1), B(0, 0), C(1, 0)
Shearing parameter towards X-direction (Shx) = 2, Y direction (Shy) = 2
Shearing in X Axis
For the co-ordinates A (1, 1):
Let the new co-ordinates of corner A after shearing be = (Xnew, Ynew).
When we apply the shearing equations, we get-
Xnew= Xold + Shx x Yold = 1 + 2 x 1 = 3
Ynew= Yold = 1
Thus, the new co-ordinates of corner A after shearing is = (3, 1).
For the co-ordinates B (0, 0):
Let the new co-ordinates of corner B after shearing be = (Xnew, Ynew).
When we apply the shearing equations, we get-
Xnew= Xold + Shx x Yold = 0 + 2 x 0 = 0
Ynew= Yold = 0
Thus, the new co-ordinates of corner B after shearing is = (0, 0).
For the co-ordinates C (1, 0)
Let the new co-ordinates of corner C after shearing be = (Xnew, Ynew).
When we apply the shearing equations, we get-
Xnew= Xold + Shx x Yold = 1 + 2 x 0 = 1
Ynew= Yold = 0
Thus, the new co-ordinates of corner C after shearing is = (1, 0).
Thus, the new co-ordinates of the after shearing in X axis = A (3, 1), B (0, 0), C (1, 0).
Shearing in Y Axis
For the co-ordinates A (1, 1)
Let the new coordinates of corner A after shearing be = (Xnew, Ynew).
When we apply the shearing equations, we get-
Xnew= Xold = 1
Ynew= Yold + Shy x Xold = 1 + 2 x 1 = 3
Thus, the new co-ordinates of corner A after shearing is = (1, 3).
For the co-ordinates B (0, 0)
Let the new co-ordinates of corner B after shearing be = (Xnew, Ynew).
When we apply the shearing equations, we get-
Xnew= Xold = 0
Ynew= Yold + Shy x Xold = 0 + 2 x 0 = 0
Thus, the new co-ordinates of corner B after shearing is = (0, 0).
For the co-ordinates C (1, 0)
Let the new co-ordinates of corner C after shearing be = (Xnew, Ynew).
When we apply the shearing equations, we get-
Xnew= Xold = 1
Ynew= Yold + Shy x Xold = 0 + 2 x 1 = 2
Thus, new co-ordinates of corner C after shearing is = (1, 2).
Thus, the new co-ordinates of the triangle after shearing in Y axis is = A (1, 3), B (0, 0), C (1, 2).
98. Explian Sutherland‐hodgemam algorithm for clipping.
It is performed by processing the boundary of polygon against each window corner or edge. First of all entire polygon is clipped against one edge, then resulting polygon is considered, then the polygon is considered against the second edge, so on for all four edges.
Four possible situations while processing
- If the first vertex is an outside the window, the second vertex is inside the window. Then second vertex is added to the output list. The point of intersection of window boundary and polygon side (edge) is also added to the output line.
- If both vertexes are inside window boundary. Then only second vertex is added to the output list.
- If the first vertex is inside the window and second is an outside window. The edge which intersects with window is added to output list.
- If both vertices are the outside window, then nothing is added to output list.
Following figures shows original polygon and clipping of polygon against four windows.
99. What do you understand by Input/Output devices ?
An input/output (I/O) device is a piece of hardware that can take, output, or process data. It receives data as input and provides it to a computer, as well as sends computer data to storage media as a storage output.
100. What is point clipping and line clipping?
Point Clipping: Point clipping tells us whether the given point X,Y is within the given window or not; and decides whether we will use the minimum and maximum coordinates of the window. The X-coordinate of the given point is inside the window, if X lies in between Wx1 ≤ X ≤ Wx2.
Line clipping: Line clipping is the process of removing (clipping) lines or portions of lines outside an area of interest (a viewport or view volume). Typically, any part of a line that is outside of the viewing area is removed.
101. Give the 3‐D Transformation matrix for a) Translation b) Rotation c) scaling
a) Translation:
It is the movement of an object from one position to another position. Translation is done using translation vectors. There are three vectors in 3D instead of two. These vectors are in x, y, and z directions. Translation in the x-direction is represented using Tx. The translation is y-direction is represented using Ty. The translation in the z- direction is represented using Tz.
If P is a point having co-ordinates in three directions (x, y, z) is translated, then after translation its coordinates will be (x1 y1 z1) after translation. Tx Ty Tz are translation vectors in x, y, and z directions respectively.
Three-dimensional transformations are performed by transforming each vertex of the object. If an object has five corners, then the translation will be accomplished by translating all five points to new locations. Following figure 1 shows the translation of point figure 2 shows the translation of the cube.
102. What is the difference between Raster and Random scan ?
The difference between Raster and Random scan are as follows:
103. Derive the transformation matrix for rotation about an arbitrary axis
When the object is rotated about an axis that is not parallel to any one of co-ordinate axis, i.e., x, y, z. Then additional transformations are required. First of all, alignment is needed, and then the object is being back to the original position. Following steps are required
- Translate the object to the origin
- Rotate object so that axis of object coincide with any of coordinate axis.
- Perform rotation about co-ordinate axis with whom coinciding is done.
- Apply inverse rotation to bring rotation back to the original position.
- Apply inverse translation to bring rotation axis to the original position.
For such transformations, composite transformations are required. All the above steps are applied on points P' and P".Each step is explained using a separate figure.
Step1: Initial position of P' and P"is shown
Step2: Translate object P' to origin
Step3: Rotate P" to z axis so that it aligns along the z-axis
Step4: Rotate about around z- axis
Step5: Rotate axis to the original position
Step6: Translate axis to the original position.
104. Expalin the Z‐Buffer Algorithm for hidden surface removal
It is also called a Depth Buffer Algorithm. Depth buffer algorithm is simplest image space algorithm. For each pixel on the display screen, we keep a record of the depth of an object within the pixel that lies closest to the observer. In addition to depth, we also record the intensity that should be displayed to show the object. Depth buffer is an extension of the frame buffer. Depth buffer algorithm requires 2 arrays, intensity and depth each of which is indexed by pixel coordinates (x, y).
Algorithm
For all pixels on the screen, set depth [x, y] to 1.0 and intensity [x, y] to a background value.
For each polygon in the scene, find all pixels (x, y) that lie within the boundaries of a polygon when projected onto the screen. For each of these pixels:
(a) Calculate the depth z of the polygon at (x, y)
(b) If z < depth [x, y], this polygon is closer to the observer than others already recorded for this pixel. In this case, set depth [x, y] to z and intensity [x, y] to a value corresponding to polygon's shading. If instead z > depth [x, y], the polygon already recorded at (x, y) lies closer to the observer than does this new polygon, and no action is taken.
- After all, polygons have been processed; the intensity array will contain the solution.
- The depth buffer algorithm illustrates several features common to all hidden surface algorithms.
- First, it requires a representation of all opaque surface in scene polygon in this case.
- These polygons may be faces of polyhedral recorded in the model of scene or may simply represent thin opaque 'sheets' in the scene.
- The IInd important feature of the algorithm is its use of a screen coordinate system. Before step 1, all polygons in the scene are transformed into a screen coordinate system using matrix multiplication.
Limitations of Depth Buffer
- The depth buffer Algorithm is not always practical because of the enormous size of depth and intensity arrays.
- Generating an image with a raster of 500 x 500 pixels requires 2, 50,000 storage locations for each array.
- Even though the frame buffer may provide memory for intensity array, the depth array remains large.
- To reduce the amount of storage required, the image can be divided into many smaller images, and the depth buffer algorithm is applied to each in turn.
- For example, the original 500 x 500 faster can be divided into 100 rasters each 50 x 50 pixels.
- Processing each small raster requires array of only 2500 elements, but execution time grows because each polygon is processed many times.
- Subdivision of the screen does not always increase execution time instead it can help reduce the work required to generate the image. This reduction arises because of coherence between small regions of the screen.