Computer Grpahics Solution
Computer Grpahics Solution
Short question
1.What do you mean by raster scan display?
In rastor scan display, the screen is divided into a grid of pixels, and an electron
beam scans across the screen from top to bottom, painting each line of pixels.
The beam's intensity is turned on and off to create an illuminated pattern of
spots.
13. Discuss the conditions for clipping a point against a given rectangular
window.
x≤ xmax
x ≥ xmin
y ≤ ymax
y ≥ ymin
Check whether given input lies between minimum and maximum coordinate of
viewing pane.
If yes display the point which lies inside the region otherwise discard
It.
5. Not suitable for steep lines: For steep lines, the algorithm produces
uneven pixel distribution, leading to visual artifacts.
15.Derive the component matrix of translation.
16. Show that the composition of two rotation is additive
17. What is initial decision parameter value for Bresenham’s circle drawing
algorithm?
The initial decision parameter is calculated using the radius of the circle, 𝑟.
A pixel is the smallest unit of a digital image or display and stands for
“picture element.” It is a very small, isolated dot that stands for one color
and plays the most basic part in digital images.
23. What is control point?
This algorithm uses the recursive method. First of all, a starting pixel called as
the seed is considered. The algorithm checks boundary pixel or adjacent pixels
are colored or not. If the adjacent pixel is already filled or colored then leave it,
otherwise fill it. The filling is done using four connected or eight connected
approaches.
ii. The boundary colour and colour of pixels inside in boundary should be of
different colour.
Long Question
1.Scale the square ABCD (0,0)(3,0),(3,3),(0,3) three unit in X-direction and three
unit in Y-direction with respect to origin.
4. What is Cathode Ray Tube (CRT) . Explain functioning of CRT with proper
diagram.
1. Electron Gun:
The electron gun creates a source of electrons which are focused into a
narrow beam directed at the face of the CRT.
4. Deflection Coils:
5. Phosphorus-coated screen:
The inner surface of the screen is coated with tiny phosphor dots that
emit light when struck by the electron beam
5.Prove that the multiplication of transformation matrices for two successive
rotations is commutative.
Conclusion:
ii. The boundary colour and colour of pixels inside in boundary should be of
different colour.
1. Four connected approaches: In this approach, left, right, above, below pixels are tested.
2. Eight connected approaches: In this approach, left, right, above, below and four diagonals are
selected.
The flood fill algorithm has many characters similar to boundary fill. But this
method is more suitable for filling multiple colors boundary. When boundary is
of many colors and interior is to be filled with one color we use this algorithm.
Disadvantage:
How it works:
The algorithm takes a polygon (subject polygon) and a clipping window as input.
For each edge of the clipping window (e.g., left, top, right, bottom), it examines
each vertex of the subject polygon to determine if it lies inside or outside the
clipping region.
If a vertex is outside, the algorithm calculates the intersection point between the
current edge of the polygon and the clipping window edge, adding this
intersection point to the output list.
The output list from one clipping edge becomes the input list for the next clipping
edge, repeating the process until all sides of the clipping window have been
processed.
The final output list represents the clipped polygon, containing only the vertices
that are visible within the clipping window.
Advantages:
Simple to implement and understand.
This method requires a considerable amount of memory. The first of all polygons
are stored in original form. Then clipping against left edge done and output is
stored. Then clipping against right edge done, then top edge. Finally, the bottom
edge is clipped. Results of all these operations are stored in memory. So wastage
of memory for storing intermediate polygons.
Bezier Curve
Key Features:
Applications:
Totally visible
If both endpoints have a region code of 0000, the line segment is completely
visible and inside the clipping window.
Totally invisible
If the bitwise AND of the two endpoints' region codes is not 0000, the line
segment is not visible and is rejected.
Partially visible
If the line is not totally visible or invisible, it is partially visible and needs to be
subdivided. The subdivision process is repeated until the line segments are either
completely visible or completely invisible.
17. Use DDA line generation algorithm to draw a line from (2,2) to (6,6)
18. Distinguish between random scan display and raster scan display.
23. Clip a line A (3,20), B(13.3) against a rectangular window whose left-bottom
,top-corner are at the point (5,5), (25,15) respectively..
24. Discuss point clipping algorithm.