GraphicsQuestions 2021 v3
GraphicsQuestions 2021 v3
1.
a. What is reflection transformation?
It is a transformation which produces a mirror image of an object. The mirror image can be
either about x-axis or y-axis. The object is rotated by180°.
Types of Reflection:
i. Reflection about the x-axis
ii. Reflection about the y-axis
iii. Reflection about an axis perpendicular to xy plane
and passing through the origin
iv. Reflection about line y=x
4.
5.
a. Explain Sutherland-Hodgeman Polygon clipping algorithm
b. Write boundary-fill algorithm for region filling.
Procedure fill (x, y, color, color1: integer)
int c;
c=getpixel (x, y);
if (c!=color) (c!=color1)
{
setpixel (x, y, color)
fill (x+1, y, color, color 1);
fill (x-1, y, color, color 1);
fill (x, y+1, color, color 1);
fill (x, y-1, color, color 1);
}
c. Differentiate between Flood Fill and Boundary Fill algorithms.
Comparison on
Flood fill algorithm Boundary fill algorithm
the basis of
Several colors can be contained in
Basic A single color is defined by this area.
this area.
Consumption of Memory consumption in this Memory consumption in this algorithm
memory algorithm is very high. is very low.
For coloring the interior part a
With the help of continuous searching
Process of random color is used and after that
for the boundary color, the interior
painting the old color is updated with the
part is color
new one.
The complexity In this algorithm, the complexity of In this algorithm, the complexity of the
of the algorithm the algorithm is relatively simple. algorithm is relatively complicated.
Speed It is relatively slower than others. It is relatively faster than others.
6.
7.
a. Difference between window port and view port
1.
c) Calculate the memory size required for a frame buffer to store an 8-bit color image for a
monitor having 1280×1024 resolution.
To calculate the memory size required for a frame buffer to store an 8-bit color image, we need
to multiply the resolution (in pixels) by the color depth (in bits) and divide by 8 to convert from
bits to bytes.
Given:
Resolution: 1280 × 1024
Color depth: 8 bits
Therefore, the memory size required for the frame buffer to store an 8-bit color image for a
monitor with a resolution of 1280×1024 is 1,310,720 bytes.