CG Assignment-2 With Solution
CG Assignment-2 With Solution
(BCA-401)
Assignment – 2 Solution
Q:1- What is display technology? Explain the video display devices. Also
explain the working of color CRT with proper diagram.
Ans: Display is a device used to present visual information. The main aim of any
display technology is to simplify the information sharing. Today, there are
different types of displays used for different applications. These displays can be
categorized as Video Displays, Non- Video Displays and 3D displays.
Video Displays: Video Displays are two-dimensional displays that cover a full
area, basically a rectangle.
Color CRT Monitors:
1. Inexpensive
Disadvantages:
2. Shadow-Mask Method:
o Shadow Mask Method is commonly used in Raster-Scan System because
they produce a much wider range of colors than the beam-penetration
method.
o It is used in the majority of color TV sets and monitors.
Construction: A shadow mask CRT has 3 phosphor color dots at each pixel
position.
This type of CRT has 3 electron guns, one for each color dot and a shadow mask
grid just behind the phosphor coated screen.
Shadow mask grid is pierced with small round holes in a triangular pattern.
Figure shows the delta-delta shadow mask method commonly used in color CRT
system.
Working: Triad arrangement of red, green, and blue guns.
When the three beams pass through a hole in the shadow mask, they activate a
dotted triangle, which occurs as a small color spot on the screen.
The phosphor dots in the triangles are organized so that each electron beam can
activate only its corresponding color dot when it passes through the shadow
mask.
Advantage:
1. Realistic image
2. Million different colors to be generated
3. Shadow scenes are possible
Disadvantage:
The image formed through this raster scan is known as a raster image.
The quality of this image is determined by the number of pixels which is
termed as the resolution of the image.
The amount of information each pixel represents is known as the color
depth of the image.
The raster graphics system of high quality contains 24 bits per pixel in the
frame buffer. This is referred to as a full color or true color system.
Refreshing of raster scan displays is carried out at the rate of 60 to 80
frames per second.
Random Scan Display
In Random Scan Display a beam of the electron is directed only to the screen
areas where any picture has to be displayed or drawn on the screen. It is also
termed as vector display, as it displays or draws a picture in the form of one line
at a time. It can draw and refresh lines on the screen of a picture in any
sequence not particularly specific.
Random scan monitors are used to draw a picture in one line at a time
and are thus also referred to as vector displays.
The cathode ray tube when operates as a random scan display device
directs the beam of an electron only to those areas of the screen where
display or a picture has to be drawn.
To draw a picture or display it on the screen the system goes through a
line or set of commands and draws each of them one at a time in a line
turn by turn.
The refresh rate here depends on the number of lines that are to be displayed
on the screen and are designed so that they draw the component lines of the
picture 30 to 60 times in a second.
They have a high resolution of pictures and produce smooth line drawing. It's that
smooth that while zooming also it doesn't spread.
(CCS-2016, 2017)
Ans:
Clipping: Any procedure that identifies those portions of a picture that are either
inside or outside of a specified region of space is referred to as a clipping
algorithm or simply clipping. The region against which an object is to be clipped
is called a clip window. Clipping is the process to identify the picture either inside
or outside of the displaying area.
For the viewing transformation, we want to display only those picture parts that
are within the window area. Everything outside the window is discarded. Clipping
algorithm can be applied in world co-ordinates, so that only the contents of the
window interior are mapped to device co-ordinates.
Types of Clipping :
1. Point clipping.
2. Line clipping (straight line segment).
3. Area clipping (polygons) or curve clipping.
4. Text clipping.
Line and polygon clipping routines are standard components of the graphics
package, but many packages accommodate curved objects.
1. Point Clipping: Assuming that the clip window is a rectangle in the standard
position we have a point P = (x, y) for display, if the following conditions are
satisfied :
Where the edges of the clip window (Xw min , Xw max, Yw min, Yw max ) can be
either the world co-ordinate window boundaries or viewport boundaries. If
anyone of these four conditions is not satisfied the point is clipped.
For Example: Point clipping can be applied to the scene involving explosions
that are modelled with particles (points) distributed in some region of the scene.
2. Line Clipping: A line clipping procedure involves several parts. First, we can
test a given line segment to determine whether it lies completely inside the
clipping window if it does not, we try to determine whether it lies completely
outside the window.
The bounding rectangle for a circle or other curved object can be used first to test
the overlap with a rectangular clip window. If the bounding rectangle for the
object completely inside the window, we save the object. If the rectangle is
determined to be completely outside the window, we discard the object.
If the bounding rectangle test fail, we can look for other computation saving
approaches. For a circle, we can use co-ordinate extent of individual quadrants
and then octants for testing before calculating curve window intersections.
4. Text Clipping: There are several techniques that can be used to provide text
clipping in a graphics package. The clipping technique used will depends on
method used to generate characters and the requirements of a particular
application.
A final method for handling text clipping is to clip the components of individual
characters. We now treat the character in the same way as the line.
Solution: We have,
The coordinates for x and y = P (-10, 40)
The coordinates for x and y = Q (30, -20)
Now,
Step 1: We have to compute the midpoint of the line segment PQ.
Q = [(-10 + 30) /2, (40 - 20)/2]
= (10, 10)
Now the new coordinates of Q = (10, 10)
Step 2: Now, we will find
Q’’ = midpoint of the Q’ and Q
Q’’ = [(10 + 30) /2, (10 + (-20))/2]
= (20, -5)
Now the new coordinates of Q’’ = (20, -5)
Here (20, -5) is much better than (10, 10)
Now we have to find Q’’’ then,
Q’’’ = [(20 + 30) /2, (-55 + ((-20))/2]
= (25, -12.5)
Now the new coordinates of Q’’’ = (25, -12.5)
We can clip the line from Q’’ to Q from the top side.
Step 3: Now, we will take left hand side part. The endpoints are P and Q’’’
We will find the midpoint of P and Q’’’
P (-10,40)
10,40) and Q’’’ (25, -12.5)
P’ = [(-10
10 + 25) /2, (40 + ((-12.5))/2]
= (7.5, 27.5)
Now we will find the midpoint of P and P’’
P (-10,
10, 40) and P’ (7.5, 27.5)
P’’ = [(-10
10 + 7.5) /2, (40 + (27.5))/2]
= (-1.25, 33.75)
Now we will find midpoint of P’’ and P
P’’’ = P (-10,
10, 40) and P’’ ((-1.25, 33.75)
= [(-10 + (-1.25))
1.25)) /2, (40 + 33.75)/2]
= (5.62, 36.87)
Now we will clip the line from P to P’’’
Finally, we have P’’’ = (5.62, 36.87)
Q’’’ = (25, -12.5)