0% found this document useful (0 votes)
50 views19 pages

CG 2019 Solution

Pixels are the smallest units that make up a digital image. Each pixel is represented by a combination of red, green, and blue intensity values. Scan conversion is the process of converting graphical objects into discrete pixels for display. It determines which pixels to turn on or off to render a shape like a line. Plasma panel displays and thin film electroluminescent displays are two flat panel display technologies that differ in their use of technology, light emission method, color production, structure, brightness, and typical applications.

Uploaded by

Sachin Sharma
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
50 views19 pages

CG 2019 Solution

Pixels are the smallest units that make up a digital image. Each pixel is represented by a combination of red, green, and blue intensity values. Scan conversion is the process of converting graphical objects into discrete pixels for display. It determines which pixels to turn on or off to render a shape like a line. Plasma panel displays and thin film electroluminescent displays are two flat panel display technologies that differ in their use of technology, light emission method, color production, structure, brightness, and typical applications.

Uploaded by

Sachin Sharma
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 19

Part-A

1. what is pixel made of?

Ans.In computer graphics, a pixel (short for picture element) is the


smallest unit of a digital image. It is a combination of colors represented
by binary values, typically composed of red, green, and blue (RGB)
components. Each RGB component represents the intensity of that
color, and the combination of these three components determines the
overall color of the pixel. The values are usually stored as integers
ranging from 0 to 255, where 0 is the absence of color intensity, and
255 is the maximum intensity.

2. what is scan conversion?

Ans.)Scan conversion is the process of representing a graphical or


geometric object in a rasterized form, typically on a display device like a
computer monitor. This involves converting continuous geometric
shapes or objects, often defined in vector graphics, into discrete pixels
for rendering on a grid.

For example, when drawing a line on a computer screen, scan


conversion determines which pixels along the line's path should be
turned on to create the appearance of the line. This process is
fundamental in computer graphics to translate mathematical
descriptions of shapes into a format suitable for display on
pixel-based screens.

3. Differentiate plasma panel display and thin film


electroluminios display.

Ans.) Plasma Panel Display and Thin Film Electroluminescent (TFEL)


Display are two different technologies used in flat-panel displays. Here
are the differentiating characteristics:

i)Technology:

*Plasma Panel Display: Utilizes small cells containing electrically


charged ionized gases (plasma) to emit ultraviolet light, which then
interacts with phosphors to produce visible colors.

*Thin Film Electroluminescent Display: Relies on thin film


electroluminescent materials that emit light when an electric field is
applied. It operates on the principle of electroluminescence, where the
material emits light in response to an electric current.

ii)Light Emission:

*Plasma Panel Display: Emits light through the excitation of phosphors


by ultraviolet radiation generated by plasma.

*Thin Film Electroluminescent Display: Emits light directly from the


electroluminescent material when an electric field is applied.

iii)Color Production:

*Plasma Panel Display: Achieves color by using different phosphors for


red, green, and blue.

*Thin Film Electroluminescent Display: Typically produces


monochromatic or limited color displays.

iv)Structure:

*Plasma Panel Display: Consists of a matrix of tiny cells formed by two


glass panels with a thin gap filled with gas.

*Thin Film Electroluminescent Display: Involves a thin film of


electroluminescent material sandwiched between layers of glass or
other substrate materials.

v)Brightness and Contrast:

*Plasma Panel Display: Historically known for high brightness and good
contrast ratios.

*Thin Film Electroluminescent Display: Can offer good contrast ratios,


but brightness may be limited compared to some other display
technologies.

vi)Applications:

*Plasma Panel Display: Commonly used in large-sized televisions and


some professional displays.

*Thin Film Electroluminescent Display: Historically used in specific


applications such as avionics and industrial displays due to its
ruggedness and long lifespan.

It's worth noting that both technologies have evolved over time, and
the prevalence of these technologies in the market has changed.
Plasma displays, in particular, have become less common in recent
years, with other technologies like LED and OLED gaining popularity.

4. Define random scan/raster scan display?

Ans.)Random Scan/Raster Scan Display:

Random Scan Display: In a random scan display, the electron beam is


directed only to the parts of the screen where a picture is to be drawn.
It doesn't follow a fixed path and can move freely to draw the image.
This method is also known as vector display.

Raster Scan Display: In a raster scan display, the electron beam


systematically scans the entire screen from left to right and top to
bottom, creating the image by turning on and off pixels. This is the most
common method used in modern computer monitors and television
screens.

5. list out the merit and demerit of puncuation technique.

Ans)Merits and Demerits of Punctuation Technique:

Merits:

Simplicity: Punctuation techniques are often straightforward and easy


to implement.

Efficiency: They can be computationally efficient for certain types of


graphics operations.

Versatility: Suitable for a variety of applications, including simple line


drawings.

Demerits:
Limited Complexity: Punctuation techniques may struggle with complex
images or scenes.

Aliasing: They can suffer from aliasing issues, resulting in jagged edges
in the displayed image.

Memory Intensive: Some techniques may require significant memory


for buffering and processing.

6. Distinguish between Convex and Concave Polygons

Ans) Convex Polygon: All line segments connecting any two points
inside the polygon lie entirely inside the polygon.

Concave Polygon: At least one line segment connecting two points


inside the polygon lies outside the polygon.

7. What is Translations?

Ans) Translations:

In computer graphics, translations refer to the process of moving an


object from one location to another in the coordinate system without
any change in its orientation or shape.

8. Distinguish between Uniform Scaling and Differential Scaling

Ans) *Uniform Scaling: In uniform scaling, all dimensions of an object


are scaled by the same factor, maintaining the object's proportions.

*Differential Scaling: In differential scaling, different dimensions of an


object are scaled by different factors, leading to a change in the object's
proportions.
9. list out the various text clipping.

Ans) Various Text Clipping Algorithms:

*Cohen-Sutherland Algorithm

*Liang-Barsky Algorithm

*Nicholl-Lee-Nicholl (NLN) Algorithm

*Weiler-Atherton Algorithm

10. Write all the steps involved in 3-D transformations.

Ans) Steps Involved in 3-D Transformations:

*Translation: Move the object to a new location in 3D space.

*Scaling: Change the size of the object along each axis.

*Rotation: Rotate the object around a specified axis or point.

*Shearing: Skew the object along one of the coordinate axes.

*Projection: Convert the 3D coordinates to 2D coordinates for display.

*Clipping: Remove any parts of the object that are outside the view
volume.

*Display: Present the transformed object on the 2D screen.

part-B
1. explain scan conversion, write bresenham's algorithm
of line m>1.
Ans) Scan Conversion and Bresenham's Algorithm for Line
>
1
m>1:

Scan Conversion: Scan conversion is the process of


converting graphical primitives, such as lines or curves,
into pixel values for display on a computer screen. It
involves determining which pixels to turn on or off to
represent the desired shape.

Bresenham's Algorithm for Line

>
1
m>1: The Bresenham's algorithm for lines with slope
greater than 1 efficiently determines the pixels to be
illuminated when drawing a line. Given two points
(

0
,

0
)
(x
0

,y
0

) and
(

1
,

1
)
(x
1

,y
1

), the algorithm is as follows:

java
Copy code
dx = x1 - x0
dy = y1 - y0
d = 2 * dy - dx
incrE = 2 * dy
incrNE = 2 * (dy - dx)
x = x0
y = y0

while (x <= x1) do


plotPixel(x, y)
if (d <= 0) then
d = d + incrE
else
d = d + incrNE
y=y+1
end if
x=x+1
end while
Cohen-Sutherland Line Clipping Algorithm:
Given line endpoints

(
40
,
80
)
P(40,80) and

(
120
,
30
)
2..Use Cohen sutherland Iine clipping algorithms to find
visible partion of the line p (40,80) q(120,30) inside the
window. The window is defined as ABCD : A(20,20),
B(60,20),C(60,40),D(20,40).
Ans) Q(120,30), and window vertices A(20,20), B(60,20),
C(60,40), D(20,40), use Cohen-Sutherland to find the
visible portion of the line inside the window.
sql
Copy code
Initial code for P: 1010 (P is outside the window)
Initial code for Q: 0010 (Q is inside the window)

Perform logical OR of the codes for P and Q: 1010 | 0010


= 1010

Since the result is not 0000, the line needs clipping. Using
Cohen-Sutherland rules:

- Both endpoints are outside the left edge (bit 3 is set), so


the line is rejected.
3. Explain in brief RGB, CMY and HSV colour models
Ans) RGB, CMY, and HSV Color Models:
*RGB (Red, Green, Blue): Represents colors using additive
color mixing. Different intensities of red, green, and blue
light are combined to produce a wide range of colors.
*CMY (Cyan, Magenta, Yellow): Represents colors using
subtractive color mixing, commonly used in color
printing. The more color added, the closer it gets to
black.
*HSV (Hue, Saturation, Value): Represents colors in terms
of their hue (type of color), saturation (intensity of color),
and value (brightness or darkness). It is more intuitive for
color manipulation.
4.What is the use of compression technique in computer
graphics? Explain JPEG.
Ans) Compression Technique in Computer Graphics -
Compression techniques reduce the storage space and
transmission bandwidth requirements for graphics data.
JPEG (Joint Photographic Experts Group) is a widely used
image compression standard.

*JPEG (Joint Photographic Experts Group): It uses a lossy


compression method that exploits the limitations of the
human eye. The algorithm divides the image into blocks,
applies a discrete cosine transform (DCT), quantizes the
coefficients, and uses Huffman coding for further
compression.
5. show how Rotation of 2D - Box represented by (5,5) to
(10,15) with respect to (5,5) by in anti-clockwise
direction.
Ans) Rotation of 2D Box:
Given a 2D box represented by vertices (5,5) and (10,15),
rotate it in an anti-clockwise direction with respect to
(5,5).
css code;
Initial vertices: A(5,5), B(10,5), C(10,15), D(5,15)
After rotation about (5,5):
A'(5,5), B'(5,10), C'(15,10), D'(15,5)
Document Architecture and Formatting in Multimedia
Systems:
*Initial vertices: A(5,5), B(10,5), C(10,15), D(5,15)
After rotation about (5,5):
A'(5,5), B'(5,10), C'(15,10), D'(15,5)Initial vertices: A(5,5),
B(10,5), C(10,15), D(5,15)

After rotation about (5,5):


A'(5,5), B'(5,10), C'(15,10), D'(15,5)Document
Architecture: Describes the structure and organization of
multimedia documents. It includes the arrangement of
text, images, audio, video, and interactive elements
within a document.

Formatting of Files/Document: Involves specifying how


multimedia elements are presented, styled, and
arranged. This can include layout, fonts, colors,
multimedia synchronization, and interaction features.
7.produce a sequence of transformation of refer on
image in the line y=mx+4c
Ans) Sequence of Transformations on Image in the Line
=

+
4

y=mx+4c:

The sequence of transformations would depend on the


specific transformations required (translation, rotation,
scaling, etc.). Please provide more details for a specific
transformation sequence.
……………………………………………………………………………
part-C
1. Explain the function of display processor in Raster scan display
compare the merit and demerit of raster and vector devices.
1. Ans) Function of Display Processor in Raster Scan Display:
● A display processor is a component in a computer
system responsible for generating the video signals
required to drive a display device, such as a monitor or
screen. In the context of a raster scan display, which is a
common type of display technology, the display
processor performs several key functions:
● Scan Conversion: Converts graphical primitives
(lines, polygons, etc.) into a series of pixels that
form the image on the display. This involves
determining which pixels should be illuminated to
represent the desired shapes.
● Frame Buffer Management: Controls the memory
area known as the frame buffer, which stores the
pixel values for the entire display. The display
processor updates the frame buffer based on the
graphical data to be displayed.
● Color Mapping: Assigns color values to pixels based
on the color information provided in the graphical
data. This is crucial for displaying images with
different colors.
● Refresh Control: Manages the refreshing of the
display to prevent flickering or distortion. In raster
scan displays, this typically involves refreshing each
pixel row sequentially from top to bottom.
● Merit and Demerit of Raster and Vector Devices:
● Raster Devices:
● Merits:
Simple and cost-effective to implement.
● Well-suited for displaying complex
images and scenes with detailed color
information.
● Widely used in most computer monitors
and television displays.
● Demerits:
● Limited scalability when it comes to
resizing images, as each pixel must be
individually addressed.
● Prone to pixelation when zooming or
enlarging images.
● Inefficient for representing geometric
shapes and curves.
● Vector Devices:
● Merits:
● Ideal for representing geometric shapes
and curves with precision.
● Scalable without loss of quality, making
them suitable for CAD (Computer-Aided
Design) applications.
● Well-suited for applications where
accuracy and smooth curves are crucial.
● Demerits:
● Complex and expensive to implement.
● Limited in handling complex images with
detailed color information.
● Less common in consumer displays
compared to raster devices.

2. Explain Beizer curve and Determine eleven points on a Beizer


curve with equidistant parametric value having central points
(x0,y0)=(50,180),(x1,y1)=(250,100),(x2,y2)=(600,300),(x3,y3)=(
500,50).
Ans) Bézier Curve and Eleven Equidistant Points:
● A Bézier curve is a type of curve defined by control points. The formula for a cubic
Bézier curve in two dimensions (x, y) is given by:
�(�)=(1−�)3∗�0+3∗(1−�)2∗�∗�1+3∗(1−�)∗�2∗�2+�3∗�3B(
t)=(1−t)3∗P0+3∗(1−t)2∗t∗P1+3∗(1−t)∗t2∗P2+t3∗P3
● Here, �t is the parametric value ranging from 0 to 1, and
�0,�1,�2,�3P0,P1,P2,P3 are the control points.
● Using the provided central points:
● �0=(50,180)P0=(50,180)
● �1=(250,100)P1=(250,100)
● �2=(600,300)P2=(600,300)
● �3=(500,50)P3=(500,50)
● To determine equidistant points, you can calculate �t values at regular intervals
and find the corresponding �(�)B(t) for each interval. For example, if you want
11 equidistant points, you can use �=0,0.1,0.2,…,1t=0,0.1,0.2,…,1 and
calculate �(�)B(t) for each value.
● Here's a simplified Python code snippet using NumPy for illustration:
pythonCopy code
import numpy as np def bezier_curve(t, p0, p1, p2, p3): return (1 - t)**3 * p0 + 3 * (1 - t)**2 * t * p1
+ 3 * (1 - t) * t**2 * p2 + t**3 * p3 # Given control points p0 = np.array([50, 180]) p1 =
np.array([250, 100]) p2 = np.array([600, 300]) p3 = np.array([500, 50]) # Calculate equidistant
points num_points = 11 equidistant_points = [bezier_curve(t, p0, p1, p2, p3) for t in np.linspace(0,
1, num_points)] # Print the result for i, point in enumerate(equidistant_points): print(f'Point {i+1}:
({point[0]:.2f}, {point[1]:.2f})')
● This code calculates 11 equidistant points on the Bézier curve defined by the given
control points. Adjust the code as needed for your specific requirements or
programming environment.

You might also like