SlideShare a Scribd company logo
1 of 53
Download to read offline
Computer Graphics & Multimedia 2022-23
Laboratory Manual
O
Or
ri
ie
en
nt
ta
al
l C
Co
ol
ll
le
eg
ge
e o
of
f T
Te
ec
ch
hn
no
ol
lo
og
gy
y,
, B
Bh
ho
op
pa
al
l
DEPARTMENT
OF
CSE DS
“COMPUTER GRAPHICS & MULTIMEDIA”
LAB MANUAL (CD504)
BACHELOR OF TECHNOLOGY (B.TECH) COURSE
SEMESTER – V
Name: ______________________________________
Semester: ___________________________________
Branch: _____________________________________
Enrollment No: _______________________________
Computer Graphics & Multimedia 2022-23
Laboratory Manual
ORIENTAL COLLEGE OF TECHNOLOGY,BHOPAL
D
DE
EP
PA
AR
RT
TM
ME
EN
NT
T O
OF
F C
CS
SE
E D
DS
S
COMPUTER GRAPHICS & MULTIMEDIA LAB MANUAL
Lab Course Outcomes
Upon the completion of COMPUTER GRAPHICS & MULTIMEDIA Laboratory, the student will be
able to:
CO No. Course Outcomes
1
To introduce the principles of computer graphics and the components of a
graphics system
2 To introduce basic algorithms for drawing line, circle and curves.
3
To develop understanding of the basic principles of 2D and 3D computer graphics
and how to transform the shapes to fit them as per the picture definition.
4 To introduce multimedia architecture and hardware
5 To introduce multimedia file formats
Computer Graphics & Multimedia 2022-23
Laboratory Manual
LIST OF EXPERIMENTS
S. No Name of Experiment Page No. Course
Outcome
1 Write a program to implement DDA line drawing
Algorithm.
CO2
2 Write a program to implement Bresenhams’ line drawing
algorithm.
CO2
3 Write a program to implement Bresenhams’ circle drawing
algorithm.
CO2
4 Write a program to draw an ellipse using Bresenhams’
algorithm.
CO2
5 Write a program to perform various
transformations on line, square & rectangle.
CO3
6 Write a program to implement Cohen Sutherland line
clipping algorithm.
CO3
7 Write a program to convert a color given in RGB space to
its equivalent HSV color space
CO3
8 Write a program to implement JPEG compression scheme
for still images.
CO5
9 Write a program to implement text compression algorithm.
CO5
10 To perform animation using any animation software. CO5
11
To perform basic operations on image using any image
editing software.
CO5
.
Computer Graphics & Multimedia 2022-23
Laboratory Manual
Experiment-1
Required Software/ Software Tool
OS:Linux Operating System or Windows Operating System C/C++
TOOLS/APPARATUS: Turbo C or gcc / gprof compiler in linux.
Objective:-To implement DDA Algorithm for drawing a Line.
Description: To DDA algorithm is an incremental scan conversion method. Here we perform
calculations at each step using the results from the preceding step. The characteristic of the DDA
algorithm is to take unit steps along one coordinate and compute the corresponding values along the
other coordinate. The unit steps are always along the coordinate of greatest change, e.g. if dx = 10
and dy = 5, then we would take unit steps along x and compute the steps along y.
In DDA we need to consider two cases;
One is slope of the line less than or equal to one (|m| ≤1) and slope of the line greater than one (m|
> 1).
 When |m| ≤ 1 means y2-y1 = x2-x1 or y2-y1 <x2-x1.In both these cases we assume x to be
themajor axis. Therefore we sample x axis at unit intervals and find the y values
corresponding to each x value. We have the slope equation as
Δ y = m Δ x
y2-y1 = m (x2-x1)
In general terms we can say that y i+1 - yi = m(x i+1 - xi ). But here Δ x = 1; therefore the equation
reduces to y i+1= yi + m = yi + dy/dx.
 When | m| > 1 means y2-y1> x2-x1 and therefore we assume y to be the major axis. Here
we sample y axis at unit intervals and find the x values corresponding to each y value. We
have the slope equation as
Δ y = m Δ x
y2-y1 = m (x2-x1)
Algorithm :
1. Start.
2. Declare variables x,y,x1,y1,x2,y2,k,dx,dy,s,xi,yi and also declare gdriver=DETECT, mode.
3. Initialize the graphic mode with the path location in TurboC3 folder.
4. Input the two line end-points and store the left end-points in (x1,y1).
5. Load (x1, y1) into the frame buffer; that is, plot the first point. put x=x1,y=y1.
6. Calculate dx=x2-x1 and dy=y2-y1.
7. If abs (dx) > abs (dy), do s=abs(dx).
8. Otherwise s= abs(dy).
9. Then xi=dx/s and yi=dy/s.
10. Start from k=0 and continuing till k<s,the points will be
i. X=x+xi.
ii. Y=y+yi.
Computer Graphics & Multimedia 2022-23
Laboratory Manual
11. Plot pixels using putpixel at points (X,Y) in specified color.
12. Close Graph and stop.
Coding:
Computer Graphics & Multimedia 2022-23
Laboratory Manual
Output:-
Computer Graphics & Multimedia 2022-23
Laboratory Manual
Experiment-2
Required Software/ Software Tool
OS:Linux Operating System or Windows Operating System C/C++
TOOLS/APPARATUS: Turbo C or gcc / gprof compiler in linux.
Objective:-To implement Bresenham ‘s Algorithm for drawing a Line.
Description:
Basic Concept:
Move across the x axis in unit intervals and at each step choose between two different y coordinates
 For example, from position (2, 3) we have to choose between (3, 3) and (3, 4). W
e
would like the point that is closer to the original line
 So we have to take decision to choose next point. So next pixels are selected b
a
s
e
don
the value of decision parameter p. The equations are given in belowalgorithm.
Algorithm :
1. Input the two line end-points, storing the left end-point in (x0, y0)
2. Plot the point (x0, y0)
3. Calculate the constants Δx, Δy, 2Δy, and (2Δy - 2Δx) and get the first value for the
decision parameter as:
4. At each xk along the line, starting at k = 0, perform the following test. If pk < 0, the next
point to plot is (xk+1, yk ) and:
Otherwise, the next point to plot is (xk+1, yk+1) and: 5.Repeat step 4
(Δx – 1) times
NOTE: The algorithm and derivation above assumes slopes are less than 1. For other slopes
Computer Graphics & Multimedia 2022-23
Laboratory Manual
we need to adjust the algorithm slightly
Coding:
Computer Graphics & Multimedia 2022-23
Laboratory Manual
Output:-
Computer Graphics & Multimedia 2022-23
Laboratory Manual
Experiment-3
Required Software/ Software Tool
OS:Linux Operating System or Windows Operating System C/C++
TOOLS/APPARATUS: Turbo C or gcc / gprof compiler in linux.
Objective:-To implement Midpoint Circle drawing Algorithm for drawing a Circle.
Description:
Basic Concept:
Circles have the property of being highly symmetrical, which is handy when it comes to drawing
them on a display screen.
 We know that there are 360 degrees in a circle. First we see that a circle is symmetrical
about the axis, so only the first 180 degrees need to be calculated.
 Next we see that it's also symmetrical about the y axis, so now we only need to calculate
the first 90 degrees.
 Finally we see that the circle is also symmetrical about the 45 degree diagonal axis, so we
only need to calculate the first 45 degrees.
 We only need to calculate the values on the border of the circle in the first octant. The
other values may be determined by symmetry.
Bresenham's circle algorithm calculates the locations of the pixels in the first 45 degrees. It assumes
that the circle is centered on the origin. So for every pixel (x, y) it calculates, we draw a pixel in each
of the eight octants of the circle. This is done till when the value of the y coordinate equals the x
coordinate. The pixel positions for determining symmetry are given in the below algorithm.
Algorithm :
1. Input radius r and circle centre (xc, yc), then set the coordinates for the first point on the
circumference of a circle centred on the origin as:
2. Calculate the initial value of the decision parameter as:
Computer Graphics & Multimedia 2022-23
Laboratory Manual
3. Starting with k = 0 at each position xk, perform the following test. If pk < 0, the next point
along the circle centred on (0, 0) is (xk+1, yk) and:
Otherwise the next point along the circle is (xk+1, yk-1) and:
4. Determine symmetry points in the other seven octants
5. Move each calculated pixel position (x, y) onto the circular path centred at (xc, yc) to plot the
coordinate values:
6. Repeat steps 3 to 5 until x >= y
Symmetric pixel positions:
 putpixel(xc+x,yc-y,GREEN); //For pixel (x,y)
 putpixel(xc+y,yc-x, GREEN); //For pixel (y,x)
 putpixel(xc+y,yc+x, GREEN); //For pixel (y,-x)
 putpixel(xc+x,yc+y, GREEN); //For pixel (x,-y)
 putpixel(xc-x,yc+y, GREEN); //For pixel(-x,-y)
 putpixel(xc-y,yc+x, GREEN); //For pixel(-y,-x)
 putpixel(xc-y,yc-x, GREEN); //For pixel(-y,x)
 putpixel(xc-x,yc-y, GREEN); //For pixel(-x,y)
Coding:
Computer Graphics & Multimedia 2022-23
Laboratory Manual
Computer Graphics & Multimedia 2022-23
Laboratory Manual
Output:
Computer Graphics & Multimedia 2022-23
Laboratory Manual
Experiment-4
Required Software/ Software Tool
OS:Linux Operating System or Windows Operating System C/C++
TOOLS/APPARATUS: Turbo C or gcc / gprof compiler in linux.
Objective:- To implement Mid-Point Ellipse drawing Algorithm for drawing an ellipse.
Description:
Basic Concept:
Midpoint ellipse algorithm is a method for drawing ellipses in computer graphics.This method is
modified from Bresenham’s algorithm. The advantage of this modified method is that only addition
operations are required in the program loops. This leads to simple and fast implementation in all
processors.
Let us consider one quarter of an ellipse. The curve is divided into two regions. In region I, the slope
on the curve is greater than –1 while in region II less than –1.
Algorithm :
1. Set RXSq = RX * RX
2. Set RYSq = RY * RY
3. Set X = 0 and Y = RY
4. Set PX = 0 and PY = 2 * RXSq * Y
5. Call Draw Elliplse(XC, YC, X, Y)
6. Set P = RYSq – (RXSq * RY) + (0.25 * RXSq) [Region 1]
7. Repeat While (PX < PY)
8. Set X = X + 1
9. PX = PX + 2 * RYSq
10. If (P < 0) Then
11. Set P = P + RYSq + PX
Computer Graphics & Multimedia 2022-23
Laboratory Manual
12. Else
Computer Graphics & Multimedia 2022-23
Laboratory Manual
13. Set Y = Y – 1
14. Set PY = PY – 2 * RXSq
15. Set P = P + RYSq + PX – PY
[End of If]
16. Call Draw Elliplse(XC, YC, X, Y)
[End of Step 7 While]
17. Set P = RYSq*(X + 0.5)2+RXSq*(Y – 1)2–RXSq*RYSq [Region 2]
18. Repeat While (Y > 0)
19. Set Y = Y – 1
20. Set PY = PY – 2 * RXSq
21. If (P > 0) Then
22. Set P = P + RXSq – PY
23. Else
24. Set X = X + 1
25. Set PX + 2 * RYSq
26. Set P = P + RXSq – PY + PX
[End of If]
27. Call Draw Ellipse(XC, YC, X, Y)
[End of Step 18 While]
28. Exit
Coding:
Computer Graphics & Multimedia 2022-23
Laboratory Manual
Computer Graphics & Multimedia 2022-23
Laboratory Manual
Output:
Computer Graphics & Multimedia 2022-23
Laboratory Manual
Experiment-5
Required Software/ Software Tool
OS:Linux Operating System or Windows Operating System C/C++
TOOLS/APPARATUS: Turbo C or gcc / gprof compiler in linux.
Objective:-Write a C-program for performing the basic 2D transformations such as
translation, Scaling, Rotation,shearing and reflection for a given 2D object.
Description:
Basic Concept:
We have to perform 2D transformations on 2D objects. Here we perform transformations on a line segment.The
2D transformations are:
1. Translation
2. Scaling
3. Rotation
4. Reflection
5. Shear
1. Translation: Translation is defined as moving the object from one position to another position
along straight line path.
We can move the objects based on translation distances along x and y axis. tx denotes translation
distance along x-axis and ty denotes translation distance along y axis.
Translation Distance: It is nothing but by how much units we should shift the object from one
location to another along x, y-axis. Consider (x,y) are old coordinates of a point. Then the new
coordinates of that same point (x’,y’) can be obtained as follows:
X’=x+tx Y’=y+ty
We denote translation transformation as P. we express above equations in matrix form as:
2. Scaling: scaling refers to changing the size of the object either by increasing or decreasing.
We will increase or decrease the size of the object based on scaling factors along x and y-axis. If
(x, y) are old coordinates of object, then new coordinates of object after applying scaling
transformation are obtained as:
x’=x*sx y’=y*sy.
Computer Graphics & Multimedia 2022-23
Laboratory Manual
sx and sy are scaling factors along x-axis and y-axis.
3. Rotation: A rotation repositions all points in an object along a circular path in the plane
centered at the pivot point. We rotate an object by an angle theta. New coordinates after rotation
depend on both x and y
or in matrix form:
x’ = xcosθ -y sinθ y’
= xsinθ+ ycosθ
P' = R • P,
R-rotation matrix.
4. Reflection: Reflection is nothing but producing mirror image of an object. Reflection can be
done just by rotating the object about given axis of reflection with an angle of 180 degrees
5. Shear:
1. Shear is the translation along an axis by an amount that increases linearly with another axis (Y).
Itproduces shape distortions as if objects were composed of layers that are caused to slide over
each other.
Computer Graphics & Multimedia 2022-23
Laboratory Manual
2. Shear transformations are very useful in creating italic letters and slanted letters from regular
letters.
3. Shear transformation changes the shape of the object to a slant position.
4. Shear transformation is of 2 types:
a. X-shear: changing x-coordinate value and keeping y constant
x’=x+shx*y y’=y
b. Y-shear: changing y coordinates value and keeping x constant
x’=x y’=y+shy*x
shx and shy are shear factors along x and y-axis.
Coding
Computer Graphics & Multimedia 2022-23
Laboratory Manual
Computer Graphics & Multimedia 2022-23
Laboratory Manual
Output:
Computer Graphics & Multimedia 2022-23
Laboratory Manual
Experiment-6
Required Software/ Software Tool
OS:Linux Operating System or Windows Operating System C/C++
TOOLS/APPARATUS: Turbo C or gcc / gprof compiler in linux.
Objective:-Write a program to implement Cohen Sutherland line clipping algorithm.
Description:
Basic Concept:
This method speeds up the processing of line segments by performing initial tests that reduce the
number of intersections that must be calculated. Every line endpoint is assigned to four digit, binary
code called region code. Region code identifies the location of the pint relative to the boundaries of
the clipping rectangle.
Bit 1: left
Bit 2: right
Bit 3: below
Bit 4: above
Syntaxes & keywords:
Drawpoly function is used to draw polygons i.e. triangle, rectangle, pentagon, hexagon etc.
Declaration :- void drawpoly( int num, int *polypoints );
outtextxy function display text or string at a specified point(x,y) on the screen. Declaration
:- void outtextxy(int x, int y, char *string);
For a line segment with endpoints (x1,y1) and (x2,y2) and one or both endpoints outside the
clipping rectangle, the parametric representation is,
X = x1+u(x2-x1) Y= y1+u(y2-y1)
Algorithm:
Step 1: Start
Step 2: Get the bottom-left coordinate of view port from the user. Step
3: Get the top-right coordinate of view port from the user.
Step 4: Get the coordinates of 1st end point of line from the user.
Step 5: Get the coordinates of 2nd endpoint of line from the user.
Step 6: Print the region code of the first and second point.
Step 7: If the points lie inside the view port, print ‖The line is totally visible.
Step 8: If the starting point lies outside the view port, print ―The line is invisible.
Step 9: If the starting point lies inside the view port and the ending point lies outside the view port,
print ―The line is partially visible
Step 10: Clip the line present outside the view port.
Step 11: Draw the clipped line present inside the view port. Step
12: Stop
Computer Graphics & Multimedia 2022-23
Laboratory Manual
Coding:
Computer Graphics & Multimedia 2022-23
Laboratory Manual
Output:
Computer Graphics & Multimedia 2022-23
Laboratory Manual
Experiment-7
Required Software/ Software Tool
OS:Linux Operating System or Windows Operating System C/C++
TOOLS/APPARATUS: Turbo C or gcc / gprof compiler in linux.
Objective:-Write a program to convert a color given in RGB space to it’s equivalent HSV
color space.
Description:
The Objective can be achieved by transformed the parameters of HSV to the RGB settings
needed for the color monitor. Transformation from HSV parameters to RGB parameters by
determining the inverse of the equations in rgbToHsv procedure.
Syntaxes & keywords commands for achieving the objective
void hsvtorgb(float h,float s,float v,float *r,float *g,float *b) void
rgbtohsv(float r,float g,float b,float *h,float *s,float *v) void hsvtorgb(float
h,float s,float v,float *r,float *g,float *b)
Description about the parts of the program with description about the language constructs
used for the same. Here passing pointers to (addresses of) r, g, and b - and the function is
returning the r,g,b values.
 hue in degrees (360.0)
 saturation in percent (0.0 - 1.0)
 value/brightness in percent (0.0-1.0)
void rgbtohsv(float r,float g,float b,float *h,float *s,float *v)
Here passing pointers to (addresses of) h, s, and v - and the function is returning the h,s,v values
Algorithm:
HSV to RGB
1. Read the H, S, V values in the range 0 to 1.
2. If the value of s is 0 then it is gray scale and the R, G, B becomes the value of
V.
3. If the value of h is 1.0 then assign h=0 else h=h*6.0 and perform the following
i= floor(h); f=h-i;
aa=v*(1-s); bb=v*(1-s*f); cc=v*(1-s*(1f)));
4. Based on the i value assign v, aa, bb ,cc to RGB and display the RGB values.
RGB to HSV
1. Read the R, G, B values.
2. Find the min,max value among the RGB values
3. Assign the maximum value to V.
4. S value is calculated by (max-min)/max.
5. H value is calculated by comparing R, G, and B values to max value.
6. Display the H, S and V values.
Computer Graphics & Multimedia 2022-23
Laboratory Manual
Coding:
Computer Graphics & Multimedia 2022-23
Laboratory Manual
OutPut:
Computer Graphics & Multimedia 2022-23
Laboratory Manual
Experiment-8
Required Software/ Software Tool
OS:Linux Operating System or Windows Operating System C/C++
TOOLS/APPARATUS: Turbo C or gcc / gprof compiler in linux.
Objective:-Write a program to implement JPEG compression scheme for still images.
Description:
The basic idea behind this method of compression is to treat a digital image as an array of
numbers i.e., a matrix. Each image consists of a fairly large number of little squares called
pixels.
Objective:
The main Objective is to reduce irrelevance and redundancy of the image data in order to be
able to store or transmit data in an efficient form.
How it is being achieved?
It can be achieved by using image compression techniques.
Syntaxes & keywords commands for achieving the objectiv
 import java.util.zip.*;
 FileInputStream()
 DeflaterOutputStream
Description about the parts of the program with description about the language constructs
used for the same.
import java.util.zip.*; - Provides classes for reading and writing the standard ZIP and GZIP
file formats.
FileInputStream() - FileInputStream is meant for reading streams of raw bytes such as image
data. For reading streams of characters, consider using FileReader. DeflaterOutputStream -
This class implements an output stream filter for compressing data in the
"deflate" compression format.
Algorithm
1. File input stream class is used to access the input file
2. Read the content of the image file and assign to a variable
3. write the value to an object
4. Repeat the step 3 until end of file.
5. Print the size of the compressed image .
Computer Graphics & Multimedia 2022-23
Laboratory Manual
Coding:
Computer Graphics & Multimedia 2022-23
Laboratory Manual
Output:
Computer Graphics & Multimedia 2022-23
Laboratory Manual
Experiment-9
Required Software/ Software Tool
OS:Linux Operating System or Windows Operating System C/C++
TOOLS/APPARATUS: Turbo C or gcc / gprof compiler in linux.
Objective:-Write a program to implement text compression algorithm.
Description:
Run Length Encoding (RLE) is a simple and popular data compression algorithm. It is based on
the idea to replace a long sequence of the same symbol by a shorter sequence and is a good
introduction into the data compression field. For instance, text files with large runs of spaces or
tabs may compress well with this algorithm.
Objective:
The main Objective is to compress the data without any loss using text compression algorithm.
How it is being achieved?
It can be achieved by replace a long sequence of the same symbol by a shorter sequence of a
symbol.
Syntaxes & keywords commands for achieving the objectiv
 gets(str); used to get the string from the userFileInputStream()
Algorithm:
1. Read the message.
2. Check the first character with the next character.
3. If it is same, then increment the count and check the next character.
4. Repeat the step 2 & 3 till reads the null character.
5. Display the encoded message
Computer Graphics & Multimedia 2022-23
Laboratory Manual
Coding:
Computer Graphics & Multimedia 2022-23
Laboratory Manual
Output:
Computer Graphics & Multimedia 2022-23
Laboratory Manual
Experiment-10
Required Software/ Software Tool
OS: Windows Operating System
TOOLS/APPARATUS: Adobe Flash Player.
Objective: - To perform animation using any animation software.
Description:
Animation is anything that moves on your screen like a cartoon character. Time sequence of
visual images on a scene. It can be achieved by using animation software like Swiss, flash
Algorithm:
Motion Tweening
Step 1: Create an object in the first layer of first key frame. Step
2: Create the last key frame and move the object to it.
Step 3: Right click on the first key frame and select create motion tween. Step
4: Play the picture.
Shape Tweening
Step 1: Create an object in the first layer of first key frame. Step
2: Create the last key frame.
Step 3: In first key frame’s properties and select shape tween.
Step 4: Change the shape of the object at the last frame.
Step 5: Play the picture.
Guide Layer
Step 1: Create an object in the first layer of first key frame. Step
2: Create the last key frame and move the object to it.
Step 3: Right click on the first key frame and select create motion tween. Step
4: Right click on the object’s layer select add motion guide.
Step 5: In motion guide draw your guide line. Step
6: Play the picture.
Masking
Step 1: Create an object in the first layer of first key frame Step
2: Add new layer and draw the shape of the view.
Step 3: Add the motion guide to the view tool.
Computer Graphics & Multimedia 2022-23
Laboratory Manual
Step 4: Right click on the second layer (view layer) and select mask.
Step 5: Play the picture.
Output
Shape Tweening
Motion Tweening
Computer Graphics & Multimedia 2022-23
Laboratory Manual
Guide Layer
Computer Graphics & Multimedia 2022-23
Laboratory Manual
Masking
Computer Graphics & Multimedia 2022-23
Laboratory Manual
Experiment-11
Required Software/ Software Tool
OS: Windows Operating System
TOOLS/APPARATUS: Adobe Flash Player.
Objective: - To perform basic operations on image using any image editing software.
Description:
Adobe Photoshop is a graphics editing program developed and published by Adobe Systems.
Photoshop is a tool that helps design sequences for videos and films by removing the guesswork
for film and video professionals.
Procedure:
The Brush Popup Palette
Allow quick, convenient access to a range of standard, preset brushes.
The Brushes Palette
Provides access to a wide variety of options for controlling the appearance and characteristics of
brush.
The Pencil Tool
Used to draw free form lines. These draws with the foreground color.
Computer Graphics & Multimedia 2022-23
Laboratory Manual
The Gradient Tool
Used to color pixels with the foreground color based on tolerance setting.
The Paint Bucket Tool
Used to color pixels with the foreground color on the tolerance setting.
Cropping An Image
Digital editors are used to crop images. Cropping creates a new image by selecting a desired
rectangular portion from the image being cropped. The unwanted part of the image is discarded.
Image cropping does not reduce the resolution of the area cropped. A primary reason for
cropping is to improve the image composition in the new image.
Removal of Unwanted Elements
Most image editors can be used to remove unwanted branches, etc., using a "clone" tool.
Image Orientation
Image orientation (from left to right): original, -30° CCW rotation, and flipped.
Sharpening And Softening Images
Graphics programs can be used to both sharpen and blur images in a number of ways, such as
unsharp masking or deconvolution.
Editing
 Open your project file and create a duplicate.
 Crop the image using crop tool.
 Change the image size using canvas technique.
Back Ground Changing
 Select the area to change the back ground using magic wand tool.
 Select the back ground image for your image.
 Move the shape of the back ground using marquee tool.
 Using selection tool, move the back ground.
Changing Color
 Select the area using Lasso tool .
 Go to image tab and adjustments and select the Hue / saturation option.
 Change the color using RGB mode.
Output
Computer Graphics & Multimedia 2021-22
42
Laboratory Manual
Results
Computer Graphics & Multimedia 2021-22
43
Laboratory Manual
ORIENTAL COLLEGE TECHNOLOGY, BHOPAL
D
DE
EP
PA
AR
RT
TM
ME
EN
NT
T O
OF
FC
CS
SE
E D
DS
S
LAB QUESTIONS
Important Viva Questions:-
1. What is 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. Write the properties of video display devices?
Properties of video display devices are persistence, resolution, and aspect ratio.
3. What is rasterization?
The process of determining the appropriate pixels for representing picture or
graphics object is known as rasterization.
4. Define Computer graphics.
Computer graphics remains one of the most existing and rapidly growing computer
fields. Computer graphics may be defined as a pictorial representation or graphical
representation of objects in a computer.
5. Name any four input devices.
Four input devices are keyboard, mouse, image scanners, and trackball.
6. Write the two techniques for producing color displays with a CRT?
Beam penetration method, shadow mask method
7. What is vertical retrace of the electron beam?
In raster scan display, at the end of one frame, the electron beam returns to the left
top corner of the screen to start the next frame, is called vertical retrace of the
electron beam.
8. Short notes on video controller?
Video controller is used to control the operation of the display device. A fixed area
of the system is reserved for the frame buffer, and the video controller is given
direct access to the frame buffer memory.
9. What is bitmap?
Some system has only one bit per pixel; the frame buffer is often referred to as bitmap.
10. Differentiate plasma panel display and thin film electro luminescent display?
Computer Graphics & Multimedia 2021-22
44
Laboratory Manual
In plasma panel display, the region between two glass plates is filled with neon gas.
In thin film electro luminescent display, the region between two glasses plates are
filled with phosphor, such as zinc sulphide doped with manganese.
11. What is resolution?
The maximum number of points that can be displayed without overlap on a CRT is
referred to as the resolution.
12. What is horizontal retrace of the electron beam?
In raster scan display, the electron beam return to the left of the screen after
refreshing each scan line, is called horizontal retrace of the electron beam.
13. What is filament?
In the CRT, heat is applied to the cathode by directing a current through a coil of
wire, is called filament.
14. What is pixmap?
Some system has multiple bits per pixel, the frame buffer is often referred to as pixmap.
15. Write the types of clipping?
Point clipping, line clipping, area clipping, text clipping and curve clipping.
16. What is meant by scan code?
When a key is pressed on the keyboard, the keyboard controller places a code carry
to the key pressed into a part of the memory called as the keyboard buffer. This
code is called as the scan code.
17. List out 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
 Poor limitation etc.
18. List out the merits and demerits of DVST?
The merits and demerits of direct view storage tubes [DVST] are as follows
• 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 CRT.
19. What do you mean by emissive and non-emissive displays?
The emissive display converts electrical energy into light energy. The plasma
panels, thin film electro-luminescent displays are the examples. The Non-emissive
are optical effects to convert the sunlight or light from any other source to graphic
form. Liquid crystal display is an example.
Computer Graphics & Multimedia 2021-22
45
Laboratory Manual
20. List out the merits and demerits of Plasma panel display?
Merits
• Refreshing is not required
• Produce a very steady image free of Flicker
• Less bulky
than a CRT. Demerits
• Poor resolution of up to 60 d.p.i
• It requires complex addressing and wiring
• It is costlier than CRT.
21. What is persistence?
The time it takes the emitted light from the screen to decay one tenth of its original
intensity is called as persistence.
22. What is Aspect ratio?
The ratio of vertical points to the horizontal points necessary to produce length of
lines in both directions of the screen is called the Aspect ratio. Usually the aspect
ratio is ¾.
23. What is the difference between impact and non-impact printers?
Impact printer 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.
24. Define pixel?
Pixel is shortened forms of picture element. Each screen point is
referred to as pixel or pel.
25. What is frame buffer?
Picture definition is stored in a memory area called frame buffer or refresh buffer.
26. Where the video controller is used?
A special purpose processor, which is used to control the operation of the display
device, is known as video controller or display controller.
27. What is run length encoding?
Run length encoding is a compression technique used to store the intensity values in
the frame buffer, which stores each scan line as a set of integer pairs.One number
each pair indicates an intensity value, and second number specifies the number of
adjacent pixels on the scan line that are to have that intensity value.
28. 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).
Computer Graphics & Multimedia 2021-22
46
Laboratory Manual
29. Write short notes on lines?
A line is of infinite extent can be defined by an angle of slope q and one point on
the line P=P(x,y). This can also be defined as y=mx+C where C is the Yintercept.
30. Define Circle?
Circle is defined by its center xc, yc and its radius in user coordinate units.The
equation of the circle is (x-xc) + (y-yc) = r2.
31. What are the various attributes of a line?
The line type, width and color are the attributes of the line. The line type include
solid line, dashed lines, and dotted lines.
32. What is antialiasing?
The process of adjusting intensities of the pixels along the line to minimize the
effect of aliasing is called antialiasing.
33. What is Transformation?
Transformation is the process of introducing changes in the shape size and
orientation of the object using scaling rotation reflection shearing & translation etc.
34. What is translation?
Translation is the process of changing the position of an object in a straight-line
path from one coordinate location to another. Every point (x , y) in the object must
undergo a displacement to (x|,y|). the transformation is: x| = x + tx ; y| = y+ty
35. What is rotation?
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 (q + f) and Y| = r sin (q + f).
36. What is scaling?
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 (q + f) and Y| = r sin (q + f).
37. 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.
38. 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.
39. What are the two classifications of shear transformation?
Computer Graphics & Multimedia 2021-22
47
Laboratory Manual
X shear, y shear.
40. A point (4,3) is rotated counterclockwise by an angle of 45°. Find
the rotation matrix and the resultant point.
41. Name any three font editing tools.
ResEdit, FONTographer,
42. Differentiate serif and sans serif fonts. Give one example
Serif fonts has a little decoration at the end of the letter, but serif font has not.
Times, new century schoolbook is the examples of serif fonts. Arial, potima are
examples for sans serif fonts.
43. Distinguish between window port & view port?
A portion of a picture that is to be displayed by a window is known as window port.
The display area of the part selected or the form in which the selected part is
viewed is known as view port.
44. Define clipping?
Clipping is the method of cutting a graphics display to neatly fit a predefined
graphics region or the view port
45. What is the need of homogeneous coordinates?
To perform more than one transformation at a time, use homogeneous coordinates
or matrixes. They reduce unwanted calculations intermediate steps saves time and
memory and produce a sequence of transformations.
46. Distinguish between uniform scaling and differential scaling?
When the scaling factors sx and sy are assigned to the same value, a uniform
scaling is produced that maintains relative object proportions. Unequal values for sx
and sy result in a differential scaling that is often used in design application.
47. What is fixed point scaling?
The location of a scaled object can be controlled by a position called the fixed point
that is to remain unchanged after the scaling transformation.
48. What is Bezier Basis Function?
Bezier Basis functions are a set of polynomials, which can be used instead of the
primitive polynomial basis, and have some useful properties for interactive curve
design.
49. What is surface patch
A single surface element can be defined as the surface traced out as two parameters
(u, v) take all possible values between 0 and 1 in a two-parameter representation.
Such a single surface element is known as a surface patch.
50. Define B-Spline curve?
Computer Graphics & Multimedia 2021-22
48
Laboratory Manual
A B-Spline curve is a set of piecewise(usually cubic) polynomial segments that pass
close to a set of control points. However the curve does not pass through these
control points, it only passes close to them.
51. What is a spline?
To produce a smooth curve through a designed set of points, a flexible
strip called spline is used. Such a spline curve can be mathematically
described with a piecewise cubic polynomial function whose first and
second derivatives are continuous across various curve section.
52. What are the different ways of specifying spline curve?
• Using a set of boundary conditions that are imposed on the spline.
• Using the state matrix that characteristics the spline
• Using a set of blending functions that calculate the positions along the
curve path by specifying combination of geometric constraints on the curve
53. What are the important properties of Bezier Curve?
• It needs only four control points
• It always passes through the first and last control points
• The curve lies entirely within the convex half formed by four control points.
54. Define Projection?
The process of displaying 3D into a 2D display unit is known as projection. The
projection transforms 3D objects into a 2D projection plane
55. What are the steps involved in 3D transformation?
• Modeling Transformation
• Viewing Transformation
• Projection Transformation
• Workstation Transformation
56. What do you mean by view plane?
A view plane is nothing but the film plane in camera which is positioned and
oriented for a particular shot of the scene.
57. Define projection?
The process of converting the description of objects from world coordinates to
viewing coordinates is known as projection
58. What you mean by parallel projection?
Parallel projection is one in which z coordinates is discarded and parallel lines from
each vertex on the object are extended until they intersect the view plane.
59. What do you mean by Perspective projection?
Perspective projection is one in which the lines of projection are not parallel.
Instead, they all converge at a single point called the center of projection.
Computer Graphics & Multimedia 2021-22
49
Laboratory Manual
60. What is Projection reference point?
In Perspective projection, the lines of projection are not parallel. Instead, they all
converge at a single point called Projection reference point.
61. Define computer graphics animation?
Computer graphics animation is the use of computer graphics equipment where the
graphics output presentation dynamically changes in real time. This is often also
called real time animation.
62. What is tweening?
It is the process, which is applicable to animation objects defined by a sequence of
points, and that change shape from frame to frame.
63. Define frame?
One of the shape photographs that a film or video is made of is known as frame.
64. What is key frame?
One of the shape photographs that a film or video is made of the shape of an object
is known initially and for a small no of other frames called key frame
65. Define Multimedia
Multimedia is the use of the computer to present and combine text, graphics, audio
and video with links and tools that lets the user to navigate, interact, create and
communicate.
66. What is multimedia PC:
A multimedia PC is a computer that has a CD-ROM or DVD drive and supports 8-
bit and 16- bit waveform audio recording and playback, MIDI sound synthesis, and
MPEG movie watching, with a central processor fast enough and a RAM large
enough to enable the user to play and interact with these media in real time, and
with a hard disk large enough to store multimedia works that the user can create.
67. Where to use multimedia?
Multimedia improves information relation. Multimedia applications include the following:
Business
Schools
Home
Public place
68. List out the benefits of multimedia
Benefits of multimedia are
 Training
 Sales
 Communications
 Medicines
69. What is hypermedia?
A set of documents in which a given document can contain text, graphics video and
Computer Graphics & Multimedia 2021-22
50
Laboratory Manual
audio clips as well as embedded references to other documents world wide web
pages are hypermedia documents.
70. What is hypertext?
Hyper text is an application of indexing text to provide a rapid search of specific
text strings in one or more documents. Hypertext is an integral part of hypermedia
documents. In multimedia applications, a hypermedia documents is the basic
complex object of which text is a sub- object. Other sub-objects in the basic object
include images, sound, and full-motion video.
71. List out the building blocks of multimedia.
 Text
 Image
 Sound
 Animation, Video
72. What are the main functions of a multimedia development system?
Multimedia development system must perform main three functions as follows:
 Input data
 Development
 Data output
Data input from sources such as cameras or musical instruments, application
development, and data output to some delivery medium such as a videodisk or CD-
ROM.
73. Define Typeface
Typeface is measured in point sizes, where one point is approximately
1/72 of an inch. It is a measure of the height of the metal blocks containing letters.
74. Define the following:
(i) X-height (ii) Set (iii) Kerning
(i.)X-height: The X-height is the measurement of the height of the character X, in
other words of the middle bit without any ascender or descender.
(ii) Set: The width of the letters is called the set and is fixed relative to the point-size.
(iii) Kerning: The spaces between letters in one world (tracking) can be adjusted in
a process called kerning.
75. Define the following respective to sound:
(i) Waveform (ii) Frequency (iii) Amplitude
i) Waveform
Sound is produced by the vibration of matter. During the vibration pressure
variation are created in the air surrounding it. The pattern of the oscillation is called
a waveform.
(ii) Frequency
Computer Graphics & Multimedia 2021-22
51
Laboratory Manual
The frequency of the sound is the reciprocal value of the period. It represents the
number of period s in a second and it is measured in Hertz (Hz) or cycles per
second.
(iii) Amplitude
A sound also has amplitude. The amplitude of a sound is a measure of the
displacement of the air pressure wave from its, or quiescent state.
76. Define quantization (or) resolution?
The resolution (or) quantization of a sample value depends on the number of bits
used in measuring the height of the waveform. An 8-bit quantization yields 256
possible values, 16-bit CD-qudra quantization results in over 65536 values.
77. What are the types of sound objects that can be used in multimedia production?
There are four types of sound objects that can be used in multimedia production:
 Waveform audio
 MIDI sound tracks
 Compact disc (CD) audio
 MP3 files
78. What is MIDI?
Musical Instrument Digital Interface (MIDI) is the interface between electronic
musical instruments and computers is a small piece of equipment that plugs directly
into the computer’s serial port and allows the transmission of music signal. MIDI is
considered to be the most compact interface that allows full-scale output.
79. List out the components of MIDI interface.
A MIDI interface has two different components:
 Hardware
 Data format
Hardware connects the equipment. It specifies the physical connection between
musical instruments, stimulate that a port MIDI port is built into an instrument,
specifies a MIDI cable and deals with electronic signals t that are sent over the
cable.
Data format encodes the information traveling through the hardware MIDI data
format includes an instrument –connected data format. The encoding includes,
besides the instrument specification, the notion of the beginning and end of a note,
basic frequency and sound volume; MIDI data allow an encoding of about 10
octaves, which corresponds to 128 notes.
80. Define the term flicker in video.
A periodic fluctuation of brightness perception is called flicker effect.
81. Define Random scan/Raster scan displays?
Random scan is a method in which the display is made by the electronic beam
which is directed only to the points or part of the screen where the picture is to be
drawn.
Computer Graphics & Multimedia 2021-22
52
Laboratory Manual
The Raster scan system is a scanning technique in which the electrons sweep from
top to bottom and from left to right. The intensity is turned on or off to light and
unlight the pixel.
82. What is an MPC?
The MPC computer is not a hardware unit but rather a standard that includes
minimum specifications to turn Intel microprocessor-based computers into
multimedia computers.
83. List all the MPC standards
There are currently three MPC standards as follows
 MPC Level 1
 MPC Level 2
 MPC Level 3
The standards apply not only to desktop computers but also to increasingly more
powerful multimedia laptops.
84. What is configuration of MPC level 1 standards?
The MPC level 1 minimum standard workstation consisted of a 16MHz 386SX
microprocessor, atleast 2MB of RAM, a 30MB Hard disk, a CD-ROM drive, VGA
video (16 colors), an 8-bit audio board, speakers and/or headphones, and Microsoft
windows software with the Multimedia Extensions package.
85. Write the configuration of MPC level 2 standards.
MPC level 2 minimum standard consisted of a 25MHz 486SX microprocessor with
atleast 4MB of RAM, a 3.5-inch high density, a 160 MB or larger hard disk drive,
and a CD-ROM drive capable of sustained 300k per second transfer rate with CD-
DA outputs and volume control, 16-bit sound capability with microphone input, and
a color monitor with display resolution of atleast 640X 480 with 65,536(64k)
colors.
86. List out the input devices of multimedia.
Input devices for a multimedia system are as follows:
 Keyboards
 Mouse
 Trackball
 Touch screen
 Magnetic card Encoders and Readers
 Graphics Tablets
 Scanners
 Optical Character Recognition (OCR) devices
 Voice Recognition Systems
 Digital cameras
Computer Graphics & Multimedia 2021-22
53
Laboratory Manual
87. What is a Video disk?
Video disk serves as the output of motion pictures and audio. The data are stored in
an analog- coded format on the disk. The reproduced data meet the highest quality
requirements. Video disk has a diameter of approximately 30cm and stores
approximately 2.6 Giga bytes.
88. What is synchronization?
Integration of the different media is given through a close relation between
information units. This is called synchronization.
89. What is meant by Multimedia User Interface?
Multimedia user interface is a computer interface that communicates with users
multiple media.
90. Define the following terms:
(i) Compression Ratio (ii) Image Quality
(i) Compression Ratio: The Compression Ratio represents the size of the original
image divided by the size of the compressed image.
(ii) Image Quality: Compression ratio typically affects picture quality, the higher
the compression ratio, the lower the quality of the decompressed image.
91. What are the higher levels of multimedia communication system (MCS)?
The higher layers of the multimedia communication system are divided into two
architectural subsystems:
• Application subsystem
• Transport subsystem.
92. Define collaborative computing environment?
The recent infrastructure of networked workstations and pcs, and the availability of
audio and video at these end points, makes it easier to people to cooperate and
bridge space and time. In this way, network connectivity and endpoint integration
of multimedia provide users with a collaborative computing environment. It is
generally known as computer supported cooperative work (CSCW).
93. List out the tools for collaborative computing
The tools used for collaborative computing are as follows:
• Electronic mail
• Bulletin boards(e.g. Usenet news)
• Screen sharing tools(e.g. show me from sunsoft)
• Text-based conferencing systems (e.g. Internet relay chat, CompuServe,
America online).
• Telephone conference systems.
• Conference rooms(e.g. video window from Bellcore)
• Video conference systems(e.g.,Mbone tools)

More Related Content

Similar to CD504 CGM_Lab Manual_004e08d3838702ed11fc6d03cc82f7be.pdf

Graphics6 bresenham circlesandpolygons
Graphics6 bresenham circlesandpolygonsGraphics6 bresenham circlesandpolygons
Graphics6 bresenham circlesandpolygons
Thirunavukarasu Mani
 
Graphics6 bresenham circlesandpolygons
Graphics6 bresenham circlesandpolygonsGraphics6 bresenham circlesandpolygons
Graphics6 bresenham circlesandpolygons
Ketan Jani
 
Bresenham circlesandpolygons
Bresenham circlesandpolygonsBresenham circlesandpolygons
Bresenham circlesandpolygons
aa11bb11
 

Similar to CD504 CGM_Lab Manual_004e08d3838702ed11fc6d03cc82f7be.pdf (20)

Output Primitive and Brenshamas Line.pptx
Output Primitive and Brenshamas Line.pptxOutput Primitive and Brenshamas Line.pptx
Output Primitive and Brenshamas Line.pptx
 
computer graphics-C/C++-dancingdollcode
computer graphics-C/C++-dancingdollcodecomputer graphics-C/C++-dancingdollcode
computer graphics-C/C++-dancingdollcode
 
raster algorithm.pdf
raster algorithm.pdfraster algorithm.pdf
raster algorithm.pdf
 
Primitives
PrimitivesPrimitives
Primitives
 
Computer Graphics Unit 2
Computer Graphics Unit 2Computer Graphics Unit 2
Computer Graphics Unit 2
 
Computer graphics lab report with code in cpp
Computer graphics lab report with code in cppComputer graphics lab report with code in cpp
Computer graphics lab report with code in cpp
 
module 1.pdf
module 1.pdfmodule 1.pdf
module 1.pdf
 
4 CG_U1_M3_PPT_4 DDA.pptx
4 CG_U1_M3_PPT_4 DDA.pptx4 CG_U1_M3_PPT_4 DDA.pptx
4 CG_U1_M3_PPT_4 DDA.pptx
 
Lecture _Line Scan Conversion.ppt
Lecture _Line Scan Conversion.pptLecture _Line Scan Conversion.ppt
Lecture _Line Scan Conversion.ppt
 
Graphics6 bresenham circlesandpolygons
Graphics6 bresenham circlesandpolygonsGraphics6 bresenham circlesandpolygons
Graphics6 bresenham circlesandpolygons
 
Graphics6 bresenham circlesandpolygons
Graphics6 bresenham circlesandpolygonsGraphics6 bresenham circlesandpolygons
Graphics6 bresenham circlesandpolygons
 
Output primitives in Computer Graphics
Output primitives in Computer GraphicsOutput primitives in Computer Graphics
Output primitives in Computer Graphics
 
Line drawing Algorithm DDA in computer Graphics.pdf
Line drawing Algorithm DDA in computer Graphics.pdfLine drawing Algorithm DDA in computer Graphics.pdf
Line drawing Algorithm DDA in computer Graphics.pdf
 
Bresenham circlesandpolygons
Bresenham circlesandpolygonsBresenham circlesandpolygons
Bresenham circlesandpolygons
 
Bresenham circles and polygons derication
Bresenham circles and polygons dericationBresenham circles and polygons derication
Bresenham circles and polygons derication
 
Unit-2 raster scan graphics,line,circle and polygon algorithms
Unit-2 raster scan graphics,line,circle and polygon algorithmsUnit-2 raster scan graphics,line,circle and polygon algorithms
Unit-2 raster scan graphics,line,circle and polygon algorithms
 
Chapter 3 Output Primitives
Chapter 3 Output PrimitivesChapter 3 Output Primitives
Chapter 3 Output Primitives
 
Computer graphics
Computer graphics   Computer graphics
Computer graphics
 
Computer graphics
Computer graphics   Computer graphics
Computer graphics
 
CS 354 More Graphics Pipeline
CS 354 More Graphics PipelineCS 354 More Graphics Pipeline
CS 354 More Graphics Pipeline
 

Recently uploaded

Just Call Vip call girls Firozabad Escorts ☎️9352988975 Two shot with one gir...
Just Call Vip call girls Firozabad Escorts ☎️9352988975 Two shot with one gir...Just Call Vip call girls Firozabad Escorts ☎️9352988975 Two shot with one gir...
Just Call Vip call girls Firozabad Escorts ☎️9352988975 Two shot with one gir...
gajnagarg
 
怎样办理哥伦比亚大学毕业证(Columbia毕业证书)成绩单学校原版复制
怎样办理哥伦比亚大学毕业证(Columbia毕业证书)成绩单学校原版复制怎样办理哥伦比亚大学毕业证(Columbia毕业证书)成绩单学校原版复制
怎样办理哥伦比亚大学毕业证(Columbia毕业证书)成绩单学校原版复制
yynod
 
Call Girls Bommanahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service ...
Call Girls Bommanahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service ...Call Girls Bommanahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service ...
Call Girls Bommanahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service ...
amitlee9823
 
Call Girls Devanahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Devanahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service B...Call Girls Devanahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Devanahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
amitlee9823
 
➥🔝 7737669865 🔝▻ Pallavaram Call-girls in Women Seeking Men 🔝Pallavaram🔝 E...
➥🔝 7737669865 🔝▻ Pallavaram Call-girls in Women Seeking Men  🔝Pallavaram🔝   E...➥🔝 7737669865 🔝▻ Pallavaram Call-girls in Women Seeking Men  🔝Pallavaram🔝   E...
➥🔝 7737669865 🔝▻ Pallavaram Call-girls in Women Seeking Men 🔝Pallavaram🔝 E...
amitlee9823
 
➥🔝 7737669865 🔝▻ Tumkur Call-girls in Women Seeking Men 🔝Tumkur🔝 Escorts S...
➥🔝 7737669865 🔝▻ Tumkur Call-girls in Women Seeking Men  🔝Tumkur🔝   Escorts S...➥🔝 7737669865 🔝▻ Tumkur Call-girls in Women Seeking Men  🔝Tumkur🔝   Escorts S...
➥🔝 7737669865 🔝▻ Tumkur Call-girls in Women Seeking Men 🔝Tumkur🔝 Escorts S...
amitlee9823
 
Call Girls In Kr Puram ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Kr Puram ☎ 7737669865 🥵 Book Your One night StandCall Girls In Kr Puram ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Kr Puram ☎ 7737669865 🥵 Book Your One night Stand
amitlee9823
 
Gabriel_Carter_EXPOLRATIONpp.pptx........
Gabriel_Carter_EXPOLRATIONpp.pptx........Gabriel_Carter_EXPOLRATIONpp.pptx........
Gabriel_Carter_EXPOLRATIONpp.pptx........
deejay178
 
➥🔝 7737669865 🔝▻ Nandyal Call-girls in Women Seeking Men 🔝Nandyal🔝 Escorts...
➥🔝 7737669865 🔝▻ Nandyal Call-girls in Women Seeking Men  🔝Nandyal🔝   Escorts...➥🔝 7737669865 🔝▻ Nandyal Call-girls in Women Seeking Men  🔝Nandyal🔝   Escorts...
➥🔝 7737669865 🔝▻ Nandyal Call-girls in Women Seeking Men 🔝Nandyal🔝 Escorts...
amitlee9823
 
Top profile Call Girls In Jabalpur [ 7014168258 ] Call Me For Genuine Models ...
Top profile Call Girls In Jabalpur [ 7014168258 ] Call Me For Genuine Models ...Top profile Call Girls In Jabalpur [ 7014168258 ] Call Me For Genuine Models ...
Top profile Call Girls In Jabalpur [ 7014168258 ] Call Me For Genuine Models ...
gajnagarg
 
➥🔝 7737669865 🔝▻ Secunderabad Call-girls in Women Seeking Men 🔝Secunderabad🔝...
➥🔝 7737669865 🔝▻ Secunderabad Call-girls in Women Seeking Men  🔝Secunderabad🔝...➥🔝 7737669865 🔝▻ Secunderabad Call-girls in Women Seeking Men  🔝Secunderabad🔝...
➥🔝 7737669865 🔝▻ Secunderabad Call-girls in Women Seeking Men 🔝Secunderabad🔝...
amitlee9823
 
➥🔝 7737669865 🔝▻ bhavnagar Call-girls in Women Seeking Men 🔝bhavnagar🔝 Esc...
➥🔝 7737669865 🔝▻ bhavnagar Call-girls in Women Seeking Men  🔝bhavnagar🔝   Esc...➥🔝 7737669865 🔝▻ bhavnagar Call-girls in Women Seeking Men  🔝bhavnagar🔝   Esc...
➥🔝 7737669865 🔝▻ bhavnagar Call-girls in Women Seeking Men 🔝bhavnagar🔝 Esc...
amitlee9823
 
Just Call Vip call girls Jammu Escorts ☎️9352988975 Two shot with one girl (J...
Just Call Vip call girls Jammu Escorts ☎️9352988975 Two shot with one girl (J...Just Call Vip call girls Jammu Escorts ☎️9352988975 Two shot with one girl (J...
Just Call Vip call girls Jammu Escorts ☎️9352988975 Two shot with one girl (J...
gajnagarg
 
Call Girls In Kengeri Satellite Town ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Kengeri Satellite Town ☎ 7737669865 🥵 Book Your One night StandCall Girls In Kengeri Satellite Town ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Kengeri Satellite Town ☎ 7737669865 🥵 Book Your One night Stand
amitlee9823
 
➥🔝 7737669865 🔝▻ Satara Call-girls in Women Seeking Men 🔝Satara🔝 Escorts S...
➥🔝 7737669865 🔝▻ Satara Call-girls in Women Seeking Men  🔝Satara🔝   Escorts S...➥🔝 7737669865 🔝▻ Satara Call-girls in Women Seeking Men  🔝Satara🔝   Escorts S...
➥🔝 7737669865 🔝▻ Satara Call-girls in Women Seeking Men 🔝Satara🔝 Escorts S...
amitlee9823
 
Call Girls Hosur Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Hosur Just Call 👗 7737669865 👗 Top Class Call Girl Service BangaloreCall Girls Hosur Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Hosur Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
amitlee9823
 

Recently uploaded (20)

Just Call Vip call girls Firozabad Escorts ☎️9352988975 Two shot with one gir...
Just Call Vip call girls Firozabad Escorts ☎️9352988975 Two shot with one gir...Just Call Vip call girls Firozabad Escorts ☎️9352988975 Two shot with one gir...
Just Call Vip call girls Firozabad Escorts ☎️9352988975 Two shot with one gir...
 
Kannada Call Girls Mira Bhayandar WhatsApp +91-9930687706, Best Service
Kannada Call Girls Mira Bhayandar WhatsApp +91-9930687706, Best ServiceKannada Call Girls Mira Bhayandar WhatsApp +91-9930687706, Best Service
Kannada Call Girls Mira Bhayandar WhatsApp +91-9930687706, Best Service
 
怎样办理哥伦比亚大学毕业证(Columbia毕业证书)成绩单学校原版复制
怎样办理哥伦比亚大学毕业证(Columbia毕业证书)成绩单学校原版复制怎样办理哥伦比亚大学毕业证(Columbia毕业证书)成绩单学校原版复制
怎样办理哥伦比亚大学毕业证(Columbia毕业证书)成绩单学校原版复制
 
Call Girls Bommanahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service ...
Call Girls Bommanahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service ...Call Girls Bommanahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service ...
Call Girls Bommanahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service ...
 
Call Girls Devanahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Devanahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service B...Call Girls Devanahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Devanahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
 
➥🔝 7737669865 🔝▻ Pallavaram Call-girls in Women Seeking Men 🔝Pallavaram🔝 E...
➥🔝 7737669865 🔝▻ Pallavaram Call-girls in Women Seeking Men  🔝Pallavaram🔝   E...➥🔝 7737669865 🔝▻ Pallavaram Call-girls in Women Seeking Men  🔝Pallavaram🔝   E...
➥🔝 7737669865 🔝▻ Pallavaram Call-girls in Women Seeking Men 🔝Pallavaram🔝 E...
 
Miletti Gabriela_Vision Plan for artist Jahzel.pdf
Miletti Gabriela_Vision Plan for artist Jahzel.pdfMiletti Gabriela_Vision Plan for artist Jahzel.pdf
Miletti Gabriela_Vision Plan for artist Jahzel.pdf
 
➥🔝 7737669865 🔝▻ Tumkur Call-girls in Women Seeking Men 🔝Tumkur🔝 Escorts S...
➥🔝 7737669865 🔝▻ Tumkur Call-girls in Women Seeking Men  🔝Tumkur🔝   Escorts S...➥🔝 7737669865 🔝▻ Tumkur Call-girls in Women Seeking Men  🔝Tumkur🔝   Escorts S...
➥🔝 7737669865 🔝▻ Tumkur Call-girls in Women Seeking Men 🔝Tumkur🔝 Escorts S...
 
Call Girls In Kr Puram ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Kr Puram ☎ 7737669865 🥵 Book Your One night StandCall Girls In Kr Puram ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Kr Puram ☎ 7737669865 🥵 Book Your One night Stand
 
Gabriel_Carter_EXPOLRATIONpp.pptx........
Gabriel_Carter_EXPOLRATIONpp.pptx........Gabriel_Carter_EXPOLRATIONpp.pptx........
Gabriel_Carter_EXPOLRATIONpp.pptx........
 
➥🔝 7737669865 🔝▻ Nandyal Call-girls in Women Seeking Men 🔝Nandyal🔝 Escorts...
➥🔝 7737669865 🔝▻ Nandyal Call-girls in Women Seeking Men  🔝Nandyal🔝   Escorts...➥🔝 7737669865 🔝▻ Nandyal Call-girls in Women Seeking Men  🔝Nandyal🔝   Escorts...
➥🔝 7737669865 🔝▻ Nandyal Call-girls in Women Seeking Men 🔝Nandyal🔝 Escorts...
 
Top profile Call Girls In Jabalpur [ 7014168258 ] Call Me For Genuine Models ...
Top profile Call Girls In Jabalpur [ 7014168258 ] Call Me For Genuine Models ...Top profile Call Girls In Jabalpur [ 7014168258 ] Call Me For Genuine Models ...
Top profile Call Girls In Jabalpur [ 7014168258 ] Call Me For Genuine Models ...
 
DMER-AYUSH-MIMS-Staff-Nurse-_Selection-List-04-05-2024.pdf
DMER-AYUSH-MIMS-Staff-Nurse-_Selection-List-04-05-2024.pdfDMER-AYUSH-MIMS-Staff-Nurse-_Selection-List-04-05-2024.pdf
DMER-AYUSH-MIMS-Staff-Nurse-_Selection-List-04-05-2024.pdf
 
➥🔝 7737669865 🔝▻ Secunderabad Call-girls in Women Seeking Men 🔝Secunderabad🔝...
➥🔝 7737669865 🔝▻ Secunderabad Call-girls in Women Seeking Men  🔝Secunderabad🔝...➥🔝 7737669865 🔝▻ Secunderabad Call-girls in Women Seeking Men  🔝Secunderabad🔝...
➥🔝 7737669865 🔝▻ Secunderabad Call-girls in Women Seeking Men 🔝Secunderabad🔝...
 
➥🔝 7737669865 🔝▻ bhavnagar Call-girls in Women Seeking Men 🔝bhavnagar🔝 Esc...
➥🔝 7737669865 🔝▻ bhavnagar Call-girls in Women Seeking Men  🔝bhavnagar🔝   Esc...➥🔝 7737669865 🔝▻ bhavnagar Call-girls in Women Seeking Men  🔝bhavnagar🔝   Esc...
➥🔝 7737669865 🔝▻ bhavnagar Call-girls in Women Seeking Men 🔝bhavnagar🔝 Esc...
 
Guide to a Winning Interview May 2024 for MCWN
Guide to a Winning Interview May 2024 for MCWNGuide to a Winning Interview May 2024 for MCWN
Guide to a Winning Interview May 2024 for MCWN
 
Just Call Vip call girls Jammu Escorts ☎️9352988975 Two shot with one girl (J...
Just Call Vip call girls Jammu Escorts ☎️9352988975 Two shot with one girl (J...Just Call Vip call girls Jammu Escorts ☎️9352988975 Two shot with one girl (J...
Just Call Vip call girls Jammu Escorts ☎️9352988975 Two shot with one girl (J...
 
Call Girls In Kengeri Satellite Town ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Kengeri Satellite Town ☎ 7737669865 🥵 Book Your One night StandCall Girls In Kengeri Satellite Town ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Kengeri Satellite Town ☎ 7737669865 🥵 Book Your One night Stand
 
➥🔝 7737669865 🔝▻ Satara Call-girls in Women Seeking Men 🔝Satara🔝 Escorts S...
➥🔝 7737669865 🔝▻ Satara Call-girls in Women Seeking Men  🔝Satara🔝   Escorts S...➥🔝 7737669865 🔝▻ Satara Call-girls in Women Seeking Men  🔝Satara🔝   Escorts S...
➥🔝 7737669865 🔝▻ Satara Call-girls in Women Seeking Men 🔝Satara🔝 Escorts S...
 
Call Girls Hosur Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Hosur Just Call 👗 7737669865 👗 Top Class Call Girl Service BangaloreCall Girls Hosur Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Hosur Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
 

CD504 CGM_Lab Manual_004e08d3838702ed11fc6d03cc82f7be.pdf

  • 1. Computer Graphics & Multimedia 2022-23 Laboratory Manual O Or ri ie en nt ta al l C Co ol ll le eg ge e o of f T Te ec ch hn no ol lo og gy y, , B Bh ho op pa al l DEPARTMENT OF CSE DS “COMPUTER GRAPHICS & MULTIMEDIA” LAB MANUAL (CD504) BACHELOR OF TECHNOLOGY (B.TECH) COURSE SEMESTER – V Name: ______________________________________ Semester: ___________________________________ Branch: _____________________________________ Enrollment No: _______________________________
  • 2. Computer Graphics & Multimedia 2022-23 Laboratory Manual ORIENTAL COLLEGE OF TECHNOLOGY,BHOPAL D DE EP PA AR RT TM ME EN NT T O OF F C CS SE E D DS S COMPUTER GRAPHICS & MULTIMEDIA LAB MANUAL Lab Course Outcomes Upon the completion of COMPUTER GRAPHICS & MULTIMEDIA Laboratory, the student will be able to: CO No. Course Outcomes 1 To introduce the principles of computer graphics and the components of a graphics system 2 To introduce basic algorithms for drawing line, circle and curves. 3 To develop understanding of the basic principles of 2D and 3D computer graphics and how to transform the shapes to fit them as per the picture definition. 4 To introduce multimedia architecture and hardware 5 To introduce multimedia file formats
  • 3. Computer Graphics & Multimedia 2022-23 Laboratory Manual LIST OF EXPERIMENTS S. No Name of Experiment Page No. Course Outcome 1 Write a program to implement DDA line drawing Algorithm. CO2 2 Write a program to implement Bresenhams’ line drawing algorithm. CO2 3 Write a program to implement Bresenhams’ circle drawing algorithm. CO2 4 Write a program to draw an ellipse using Bresenhams’ algorithm. CO2 5 Write a program to perform various transformations on line, square & rectangle. CO3 6 Write a program to implement Cohen Sutherland line clipping algorithm. CO3 7 Write a program to convert a color given in RGB space to its equivalent HSV color space CO3 8 Write a program to implement JPEG compression scheme for still images. CO5 9 Write a program to implement text compression algorithm. CO5 10 To perform animation using any animation software. CO5 11 To perform basic operations on image using any image editing software. CO5 .
  • 4. Computer Graphics & Multimedia 2022-23 Laboratory Manual Experiment-1 Required Software/ Software Tool OS:Linux Operating System or Windows Operating System C/C++ TOOLS/APPARATUS: Turbo C or gcc / gprof compiler in linux. Objective:-To implement DDA Algorithm for drawing a Line. Description: To DDA algorithm is an incremental scan conversion method. Here we perform calculations at each step using the results from the preceding step. The characteristic of the DDA algorithm is to take unit steps along one coordinate and compute the corresponding values along the other coordinate. The unit steps are always along the coordinate of greatest change, e.g. if dx = 10 and dy = 5, then we would take unit steps along x and compute the steps along y. In DDA we need to consider two cases; One is slope of the line less than or equal to one (|m| ≤1) and slope of the line greater than one (m| > 1).  When |m| ≤ 1 means y2-y1 = x2-x1 or y2-y1 <x2-x1.In both these cases we assume x to be themajor axis. Therefore we sample x axis at unit intervals and find the y values corresponding to each x value. We have the slope equation as Δ y = m Δ x y2-y1 = m (x2-x1) In general terms we can say that y i+1 - yi = m(x i+1 - xi ). But here Δ x = 1; therefore the equation reduces to y i+1= yi + m = yi + dy/dx.  When | m| > 1 means y2-y1> x2-x1 and therefore we assume y to be the major axis. Here we sample y axis at unit intervals and find the x values corresponding to each y value. We have the slope equation as Δ y = m Δ x y2-y1 = m (x2-x1) Algorithm : 1. Start. 2. Declare variables x,y,x1,y1,x2,y2,k,dx,dy,s,xi,yi and also declare gdriver=DETECT, mode. 3. Initialize the graphic mode with the path location in TurboC3 folder. 4. Input the two line end-points and store the left end-points in (x1,y1). 5. Load (x1, y1) into the frame buffer; that is, plot the first point. put x=x1,y=y1. 6. Calculate dx=x2-x1 and dy=y2-y1. 7. If abs (dx) > abs (dy), do s=abs(dx). 8. Otherwise s= abs(dy). 9. Then xi=dx/s and yi=dy/s. 10. Start from k=0 and continuing till k<s,the points will be i. X=x+xi. ii. Y=y+yi.
  • 5. Computer Graphics & Multimedia 2022-23 Laboratory Manual 11. Plot pixels using putpixel at points (X,Y) in specified color. 12. Close Graph and stop. Coding:
  • 6. Computer Graphics & Multimedia 2022-23 Laboratory Manual Output:-
  • 7. Computer Graphics & Multimedia 2022-23 Laboratory Manual Experiment-2 Required Software/ Software Tool OS:Linux Operating System or Windows Operating System C/C++ TOOLS/APPARATUS: Turbo C or gcc / gprof compiler in linux. Objective:-To implement Bresenham ‘s Algorithm for drawing a Line. Description: Basic Concept: Move across the x axis in unit intervals and at each step choose between two different y coordinates  For example, from position (2, 3) we have to choose between (3, 3) and (3, 4). W e would like the point that is closer to the original line  So we have to take decision to choose next point. So next pixels are selected b a s e don the value of decision parameter p. The equations are given in belowalgorithm. Algorithm : 1. Input the two line end-points, storing the left end-point in (x0, y0) 2. Plot the point (x0, y0) 3. Calculate the constants Δx, Δy, 2Δy, and (2Δy - 2Δx) and get the first value for the decision parameter as: 4. At each xk along the line, starting at k = 0, perform the following test. If pk < 0, the next point to plot is (xk+1, yk ) and: Otherwise, the next point to plot is (xk+1, yk+1) and: 5.Repeat step 4 (Δx – 1) times NOTE: The algorithm and derivation above assumes slopes are less than 1. For other slopes
  • 8. Computer Graphics & Multimedia 2022-23 Laboratory Manual we need to adjust the algorithm slightly Coding:
  • 9. Computer Graphics & Multimedia 2022-23 Laboratory Manual Output:-
  • 10. Computer Graphics & Multimedia 2022-23 Laboratory Manual Experiment-3 Required Software/ Software Tool OS:Linux Operating System or Windows Operating System C/C++ TOOLS/APPARATUS: Turbo C or gcc / gprof compiler in linux. Objective:-To implement Midpoint Circle drawing Algorithm for drawing a Circle. Description: Basic Concept: Circles have the property of being highly symmetrical, which is handy when it comes to drawing them on a display screen.  We know that there are 360 degrees in a circle. First we see that a circle is symmetrical about the axis, so only the first 180 degrees need to be calculated.  Next we see that it's also symmetrical about the y axis, so now we only need to calculate the first 90 degrees.  Finally we see that the circle is also symmetrical about the 45 degree diagonal axis, so we only need to calculate the first 45 degrees.  We only need to calculate the values on the border of the circle in the first octant. The other values may be determined by symmetry. Bresenham's circle algorithm calculates the locations of the pixels in the first 45 degrees. It assumes that the circle is centered on the origin. So for every pixel (x, y) it calculates, we draw a pixel in each of the eight octants of the circle. This is done till when the value of the y coordinate equals the x coordinate. The pixel positions for determining symmetry are given in the below algorithm. Algorithm : 1. Input radius r and circle centre (xc, yc), then set the coordinates for the first point on the circumference of a circle centred on the origin as: 2. Calculate the initial value of the decision parameter as:
  • 11. Computer Graphics & Multimedia 2022-23 Laboratory Manual 3. Starting with k = 0 at each position xk, perform the following test. If pk < 0, the next point along the circle centred on (0, 0) is (xk+1, yk) and: Otherwise the next point along the circle is (xk+1, yk-1) and: 4. Determine symmetry points in the other seven octants 5. Move each calculated pixel position (x, y) onto the circular path centred at (xc, yc) to plot the coordinate values: 6. Repeat steps 3 to 5 until x >= y Symmetric pixel positions:  putpixel(xc+x,yc-y,GREEN); //For pixel (x,y)  putpixel(xc+y,yc-x, GREEN); //For pixel (y,x)  putpixel(xc+y,yc+x, GREEN); //For pixel (y,-x)  putpixel(xc+x,yc+y, GREEN); //For pixel (x,-y)  putpixel(xc-x,yc+y, GREEN); //For pixel(-x,-y)  putpixel(xc-y,yc+x, GREEN); //For pixel(-y,-x)  putpixel(xc-y,yc-x, GREEN); //For pixel(-y,x)  putpixel(xc-x,yc-y, GREEN); //For pixel(-x,y) Coding:
  • 12. Computer Graphics & Multimedia 2022-23 Laboratory Manual
  • 13. Computer Graphics & Multimedia 2022-23 Laboratory Manual Output:
  • 14. Computer Graphics & Multimedia 2022-23 Laboratory Manual Experiment-4 Required Software/ Software Tool OS:Linux Operating System or Windows Operating System C/C++ TOOLS/APPARATUS: Turbo C or gcc / gprof compiler in linux. Objective:- To implement Mid-Point Ellipse drawing Algorithm for drawing an ellipse. Description: Basic Concept: Midpoint ellipse algorithm is a method for drawing ellipses in computer graphics.This method is modified from Bresenham’s algorithm. The advantage of this modified method is that only addition operations are required in the program loops. This leads to simple and fast implementation in all processors. Let us consider one quarter of an ellipse. The curve is divided into two regions. In region I, the slope on the curve is greater than –1 while in region II less than –1. Algorithm : 1. Set RXSq = RX * RX 2. Set RYSq = RY * RY 3. Set X = 0 and Y = RY 4. Set PX = 0 and PY = 2 * RXSq * Y 5. Call Draw Elliplse(XC, YC, X, Y) 6. Set P = RYSq – (RXSq * RY) + (0.25 * RXSq) [Region 1] 7. Repeat While (PX < PY) 8. Set X = X + 1 9. PX = PX + 2 * RYSq 10. If (P < 0) Then 11. Set P = P + RYSq + PX
  • 15. Computer Graphics & Multimedia 2022-23 Laboratory Manual 12. Else
  • 16. Computer Graphics & Multimedia 2022-23 Laboratory Manual 13. Set Y = Y – 1 14. Set PY = PY – 2 * RXSq 15. Set P = P + RYSq + PX – PY [End of If] 16. Call Draw Elliplse(XC, YC, X, Y) [End of Step 7 While] 17. Set P = RYSq*(X + 0.5)2+RXSq*(Y – 1)2–RXSq*RYSq [Region 2] 18. Repeat While (Y > 0) 19. Set Y = Y – 1 20. Set PY = PY – 2 * RXSq 21. If (P > 0) Then 22. Set P = P + RXSq – PY 23. Else 24. Set X = X + 1 25. Set PX + 2 * RYSq 26. Set P = P + RXSq – PY + PX [End of If] 27. Call Draw Ellipse(XC, YC, X, Y) [End of Step 18 While] 28. Exit Coding:
  • 17. Computer Graphics & Multimedia 2022-23 Laboratory Manual
  • 18. Computer Graphics & Multimedia 2022-23 Laboratory Manual Output:
  • 19. Computer Graphics & Multimedia 2022-23 Laboratory Manual Experiment-5 Required Software/ Software Tool OS:Linux Operating System or Windows Operating System C/C++ TOOLS/APPARATUS: Turbo C or gcc / gprof compiler in linux. Objective:-Write a C-program for performing the basic 2D transformations such as translation, Scaling, Rotation,shearing and reflection for a given 2D object. Description: Basic Concept: We have to perform 2D transformations on 2D objects. Here we perform transformations on a line segment.The 2D transformations are: 1. Translation 2. Scaling 3. Rotation 4. Reflection 5. Shear 1. Translation: Translation is defined as moving the object from one position to another position along straight line path. We can move the objects based on translation distances along x and y axis. tx denotes translation distance along x-axis and ty denotes translation distance along y axis. Translation Distance: It is nothing but by how much units we should shift the object from one location to another along x, y-axis. Consider (x,y) are old coordinates of a point. Then the new coordinates of that same point (x’,y’) can be obtained as follows: X’=x+tx Y’=y+ty We denote translation transformation as P. we express above equations in matrix form as: 2. Scaling: scaling refers to changing the size of the object either by increasing or decreasing. We will increase or decrease the size of the object based on scaling factors along x and y-axis. If (x, y) are old coordinates of object, then new coordinates of object after applying scaling transformation are obtained as: x’=x*sx y’=y*sy.
  • 20. Computer Graphics & Multimedia 2022-23 Laboratory Manual sx and sy are scaling factors along x-axis and y-axis. 3. Rotation: A rotation repositions all points in an object along a circular path in the plane centered at the pivot point. We rotate an object by an angle theta. New coordinates after rotation depend on both x and y or in matrix form: x’ = xcosθ -y sinθ y’ = xsinθ+ ycosθ P' = R • P, R-rotation matrix. 4. Reflection: Reflection is nothing but producing mirror image of an object. Reflection can be done just by rotating the object about given axis of reflection with an angle of 180 degrees 5. Shear: 1. Shear is the translation along an axis by an amount that increases linearly with another axis (Y). Itproduces shape distortions as if objects were composed of layers that are caused to slide over each other.
  • 21. Computer Graphics & Multimedia 2022-23 Laboratory Manual 2. Shear transformations are very useful in creating italic letters and slanted letters from regular letters. 3. Shear transformation changes the shape of the object to a slant position. 4. Shear transformation is of 2 types: a. X-shear: changing x-coordinate value and keeping y constant x’=x+shx*y y’=y b. Y-shear: changing y coordinates value and keeping x constant x’=x y’=y+shy*x shx and shy are shear factors along x and y-axis. Coding
  • 22. Computer Graphics & Multimedia 2022-23 Laboratory Manual
  • 23. Computer Graphics & Multimedia 2022-23 Laboratory Manual Output:
  • 24. Computer Graphics & Multimedia 2022-23 Laboratory Manual Experiment-6 Required Software/ Software Tool OS:Linux Operating System or Windows Operating System C/C++ TOOLS/APPARATUS: Turbo C or gcc / gprof compiler in linux. Objective:-Write a program to implement Cohen Sutherland line clipping algorithm. Description: Basic Concept: This method speeds up the processing of line segments by performing initial tests that reduce the number of intersections that must be calculated. Every line endpoint is assigned to four digit, binary code called region code. Region code identifies the location of the pint relative to the boundaries of the clipping rectangle. Bit 1: left Bit 2: right Bit 3: below Bit 4: above Syntaxes & keywords: Drawpoly function is used to draw polygons i.e. triangle, rectangle, pentagon, hexagon etc. Declaration :- void drawpoly( int num, int *polypoints ); outtextxy function display text or string at a specified point(x,y) on the screen. Declaration :- void outtextxy(int x, int y, char *string); For a line segment with endpoints (x1,y1) and (x2,y2) and one or both endpoints outside the clipping rectangle, the parametric representation is, X = x1+u(x2-x1) Y= y1+u(y2-y1) Algorithm: Step 1: Start Step 2: Get the bottom-left coordinate of view port from the user. Step 3: Get the top-right coordinate of view port from the user. Step 4: Get the coordinates of 1st end point of line from the user. Step 5: Get the coordinates of 2nd endpoint of line from the user. Step 6: Print the region code of the first and second point. Step 7: If the points lie inside the view port, print ‖The line is totally visible. Step 8: If the starting point lies outside the view port, print ―The line is invisible. Step 9: If the starting point lies inside the view port and the ending point lies outside the view port, print ―The line is partially visible Step 10: Clip the line present outside the view port. Step 11: Draw the clipped line present inside the view port. Step 12: Stop
  • 25. Computer Graphics & Multimedia 2022-23 Laboratory Manual Coding:
  • 26. Computer Graphics & Multimedia 2022-23 Laboratory Manual Output:
  • 27. Computer Graphics & Multimedia 2022-23 Laboratory Manual Experiment-7 Required Software/ Software Tool OS:Linux Operating System or Windows Operating System C/C++ TOOLS/APPARATUS: Turbo C or gcc / gprof compiler in linux. Objective:-Write a program to convert a color given in RGB space to it’s equivalent HSV color space. Description: The Objective can be achieved by transformed the parameters of HSV to the RGB settings needed for the color monitor. Transformation from HSV parameters to RGB parameters by determining the inverse of the equations in rgbToHsv procedure. Syntaxes & keywords commands for achieving the objective void hsvtorgb(float h,float s,float v,float *r,float *g,float *b) void rgbtohsv(float r,float g,float b,float *h,float *s,float *v) void hsvtorgb(float h,float s,float v,float *r,float *g,float *b) Description about the parts of the program with description about the language constructs used for the same. Here passing pointers to (addresses of) r, g, and b - and the function is returning the r,g,b values.  hue in degrees (360.0)  saturation in percent (0.0 - 1.0)  value/brightness in percent (0.0-1.0) void rgbtohsv(float r,float g,float b,float *h,float *s,float *v) Here passing pointers to (addresses of) h, s, and v - and the function is returning the h,s,v values Algorithm: HSV to RGB 1. Read the H, S, V values in the range 0 to 1. 2. If the value of s is 0 then it is gray scale and the R, G, B becomes the value of V. 3. If the value of h is 1.0 then assign h=0 else h=h*6.0 and perform the following i= floor(h); f=h-i; aa=v*(1-s); bb=v*(1-s*f); cc=v*(1-s*(1f))); 4. Based on the i value assign v, aa, bb ,cc to RGB and display the RGB values. RGB to HSV 1. Read the R, G, B values. 2. Find the min,max value among the RGB values 3. Assign the maximum value to V. 4. S value is calculated by (max-min)/max. 5. H value is calculated by comparing R, G, and B values to max value. 6. Display the H, S and V values.
  • 28. Computer Graphics & Multimedia 2022-23 Laboratory Manual Coding:
  • 29. Computer Graphics & Multimedia 2022-23 Laboratory Manual OutPut:
  • 30. Computer Graphics & Multimedia 2022-23 Laboratory Manual Experiment-8 Required Software/ Software Tool OS:Linux Operating System or Windows Operating System C/C++ TOOLS/APPARATUS: Turbo C or gcc / gprof compiler in linux. Objective:-Write a program to implement JPEG compression scheme for still images. Description: The basic idea behind this method of compression is to treat a digital image as an array of numbers i.e., a matrix. Each image consists of a fairly large number of little squares called pixels. Objective: The main Objective is to reduce irrelevance and redundancy of the image data in order to be able to store or transmit data in an efficient form. How it is being achieved? It can be achieved by using image compression techniques. Syntaxes & keywords commands for achieving the objectiv  import java.util.zip.*;  FileInputStream()  DeflaterOutputStream Description about the parts of the program with description about the language constructs used for the same. import java.util.zip.*; - Provides classes for reading and writing the standard ZIP and GZIP file formats. FileInputStream() - FileInputStream is meant for reading streams of raw bytes such as image data. For reading streams of characters, consider using FileReader. DeflaterOutputStream - This class implements an output stream filter for compressing data in the "deflate" compression format. Algorithm 1. File input stream class is used to access the input file 2. Read the content of the image file and assign to a variable 3. write the value to an object 4. Repeat the step 3 until end of file. 5. Print the size of the compressed image .
  • 31. Computer Graphics & Multimedia 2022-23 Laboratory Manual Coding:
  • 32. Computer Graphics & Multimedia 2022-23 Laboratory Manual Output:
  • 33. Computer Graphics & Multimedia 2022-23 Laboratory Manual Experiment-9 Required Software/ Software Tool OS:Linux Operating System or Windows Operating System C/C++ TOOLS/APPARATUS: Turbo C or gcc / gprof compiler in linux. Objective:-Write a program to implement text compression algorithm. Description: Run Length Encoding (RLE) is a simple and popular data compression algorithm. It is based on the idea to replace a long sequence of the same symbol by a shorter sequence and is a good introduction into the data compression field. For instance, text files with large runs of spaces or tabs may compress well with this algorithm. Objective: The main Objective is to compress the data without any loss using text compression algorithm. How it is being achieved? It can be achieved by replace a long sequence of the same symbol by a shorter sequence of a symbol. Syntaxes & keywords commands for achieving the objectiv  gets(str); used to get the string from the userFileInputStream() Algorithm: 1. Read the message. 2. Check the first character with the next character. 3. If it is same, then increment the count and check the next character. 4. Repeat the step 2 & 3 till reads the null character. 5. Display the encoded message
  • 34. Computer Graphics & Multimedia 2022-23 Laboratory Manual Coding:
  • 35. Computer Graphics & Multimedia 2022-23 Laboratory Manual Output:
  • 36. Computer Graphics & Multimedia 2022-23 Laboratory Manual Experiment-10 Required Software/ Software Tool OS: Windows Operating System TOOLS/APPARATUS: Adobe Flash Player. Objective: - To perform animation using any animation software. Description: Animation is anything that moves on your screen like a cartoon character. Time sequence of visual images on a scene. It can be achieved by using animation software like Swiss, flash Algorithm: Motion Tweening Step 1: Create an object in the first layer of first key frame. Step 2: Create the last key frame and move the object to it. Step 3: Right click on the first key frame and select create motion tween. Step 4: Play the picture. Shape Tweening Step 1: Create an object in the first layer of first key frame. Step 2: Create the last key frame. Step 3: In first key frame’s properties and select shape tween. Step 4: Change the shape of the object at the last frame. Step 5: Play the picture. Guide Layer Step 1: Create an object in the first layer of first key frame. Step 2: Create the last key frame and move the object to it. Step 3: Right click on the first key frame and select create motion tween. Step 4: Right click on the object’s layer select add motion guide. Step 5: In motion guide draw your guide line. Step 6: Play the picture. Masking Step 1: Create an object in the first layer of first key frame Step 2: Add new layer and draw the shape of the view. Step 3: Add the motion guide to the view tool.
  • 37. Computer Graphics & Multimedia 2022-23 Laboratory Manual Step 4: Right click on the second layer (view layer) and select mask. Step 5: Play the picture. Output Shape Tweening Motion Tweening
  • 38. Computer Graphics & Multimedia 2022-23 Laboratory Manual Guide Layer
  • 39. Computer Graphics & Multimedia 2022-23 Laboratory Manual Masking
  • 40. Computer Graphics & Multimedia 2022-23 Laboratory Manual Experiment-11 Required Software/ Software Tool OS: Windows Operating System TOOLS/APPARATUS: Adobe Flash Player. Objective: - To perform basic operations on image using any image editing software. Description: Adobe Photoshop is a graphics editing program developed and published by Adobe Systems. Photoshop is a tool that helps design sequences for videos and films by removing the guesswork for film and video professionals. Procedure: The Brush Popup Palette Allow quick, convenient access to a range of standard, preset brushes. The Brushes Palette Provides access to a wide variety of options for controlling the appearance and characteristics of brush. The Pencil Tool Used to draw free form lines. These draws with the foreground color.
  • 41. Computer Graphics & Multimedia 2022-23 Laboratory Manual The Gradient Tool Used to color pixels with the foreground color based on tolerance setting. The Paint Bucket Tool Used to color pixels with the foreground color on the tolerance setting. Cropping An Image Digital editors are used to crop images. Cropping creates a new image by selecting a desired rectangular portion from the image being cropped. The unwanted part of the image is discarded. Image cropping does not reduce the resolution of the area cropped. A primary reason for cropping is to improve the image composition in the new image. Removal of Unwanted Elements Most image editors can be used to remove unwanted branches, etc., using a "clone" tool. Image Orientation Image orientation (from left to right): original, -30° CCW rotation, and flipped. Sharpening And Softening Images Graphics programs can be used to both sharpen and blur images in a number of ways, such as unsharp masking or deconvolution. Editing  Open your project file and create a duplicate.  Crop the image using crop tool.  Change the image size using canvas technique. Back Ground Changing  Select the area to change the back ground using magic wand tool.  Select the back ground image for your image.  Move the shape of the back ground using marquee tool.  Using selection tool, move the back ground. Changing Color  Select the area using Lasso tool .  Go to image tab and adjustments and select the Hue / saturation option.  Change the color using RGB mode. Output
  • 42. Computer Graphics & Multimedia 2021-22 42 Laboratory Manual Results
  • 43. Computer Graphics & Multimedia 2021-22 43 Laboratory Manual ORIENTAL COLLEGE TECHNOLOGY, BHOPAL D DE EP PA AR RT TM ME EN NT T O OF FC CS SE E D DS S LAB QUESTIONS Important Viva Questions:- 1. What is 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. Write the properties of video display devices? Properties of video display devices are persistence, resolution, and aspect ratio. 3. What is rasterization? The process of determining the appropriate pixels for representing picture or graphics object is known as rasterization. 4. Define Computer graphics. Computer graphics remains one of the most existing and rapidly growing computer fields. Computer graphics may be defined as a pictorial representation or graphical representation of objects in a computer. 5. Name any four input devices. Four input devices are keyboard, mouse, image scanners, and trackball. 6. Write the two techniques for producing color displays with a CRT? Beam penetration method, shadow mask method 7. What is vertical retrace of the electron beam? In raster scan display, at the end of one frame, the electron beam returns to the left top corner of the screen to start the next frame, is called vertical retrace of the electron beam. 8. Short notes on video controller? Video controller is used to control the operation of the display device. A fixed area of the system is reserved for the frame buffer, and the video controller is given direct access to the frame buffer memory. 9. What is bitmap? Some system has only one bit per pixel; the frame buffer is often referred to as bitmap. 10. Differentiate plasma panel display and thin film electro luminescent display?
  • 44. Computer Graphics & Multimedia 2021-22 44 Laboratory Manual In plasma panel display, the region between two glass plates is filled with neon gas. In thin film electro luminescent display, the region between two glasses plates are filled with phosphor, such as zinc sulphide doped with manganese. 11. What is resolution? The maximum number of points that can be displayed without overlap on a CRT is referred to as the resolution. 12. What is horizontal retrace of the electron beam? In raster scan display, the electron beam return to the left of the screen after refreshing each scan line, is called horizontal retrace of the electron beam. 13. What is filament? In the CRT, heat is applied to the cathode by directing a current through a coil of wire, is called filament. 14. What is pixmap? Some system has multiple bits per pixel, the frame buffer is often referred to as pixmap. 15. Write the types of clipping? Point clipping, line clipping, area clipping, text clipping and curve clipping. 16. What is meant by scan code? When a key is pressed on the keyboard, the keyboard controller places a code carry to the key pressed into a part of the memory called as the keyboard buffer. This code is called as the scan code. 17. List out 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  Poor limitation etc. 18. List out the merits and demerits of DVST? The merits and demerits of direct view storage tubes [DVST] are as follows • 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 CRT. 19. What do you mean by emissive and non-emissive displays? The emissive display converts electrical energy into light energy. The plasma panels, thin film electro-luminescent displays are the examples. The Non-emissive are optical effects to convert the sunlight or light from any other source to graphic form. Liquid crystal display is an example.
  • 45. Computer Graphics & Multimedia 2021-22 45 Laboratory Manual 20. List out the merits and demerits of Plasma panel display? Merits • Refreshing is not required • Produce a very steady image free of Flicker • Less bulky than a CRT. Demerits • Poor resolution of up to 60 d.p.i • It requires complex addressing and wiring • It is costlier than CRT. 21. What is persistence? The time it takes the emitted light from the screen to decay one tenth of its original intensity is called as persistence. 22. What is Aspect ratio? The ratio of vertical points to the horizontal points necessary to produce length of lines in both directions of the screen is called the Aspect ratio. Usually the aspect ratio is ¾. 23. What is the difference between impact and non-impact printers? Impact printer 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. 24. Define pixel? Pixel is shortened forms of picture element. Each screen point is referred to as pixel or pel. 25. What is frame buffer? Picture definition is stored in a memory area called frame buffer or refresh buffer. 26. Where the video controller is used? A special purpose processor, which is used to control the operation of the display device, is known as video controller or display controller. 27. What is run length encoding? Run length encoding is a compression technique used to store the intensity values in the frame buffer, which stores each scan line as a set of integer pairs.One number each pair indicates an intensity value, and second number specifies the number of adjacent pixels on the scan line that are to have that intensity value. 28. 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).
  • 46. Computer Graphics & Multimedia 2021-22 46 Laboratory Manual 29. Write short notes on lines? A line is of infinite extent can be defined by an angle of slope q and one point on the line P=P(x,y). This can also be defined as y=mx+C where C is the Yintercept. 30. Define Circle? Circle is defined by its center xc, yc and its radius in user coordinate units.The equation of the circle is (x-xc) + (y-yc) = r2. 31. What are the various attributes of a line? The line type, width and color are the attributes of the line. The line type include solid line, dashed lines, and dotted lines. 32. What is antialiasing? The process of adjusting intensities of the pixels along the line to minimize the effect of aliasing is called antialiasing. 33. What is Transformation? Transformation is the process of introducing changes in the shape size and orientation of the object using scaling rotation reflection shearing & translation etc. 34. What is translation? Translation is the process of changing the position of an object in a straight-line path from one coordinate location to another. Every point (x , y) in the object must undergo a displacement to (x|,y|). the transformation is: x| = x + tx ; y| = y+ty 35. What is rotation? 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 (q + f) and Y| = r sin (q + f). 36. What is scaling? 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 (q + f) and Y| = r sin (q + f). 37. 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. 38. 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. 39. What are the two classifications of shear transformation?
  • 47. Computer Graphics & Multimedia 2021-22 47 Laboratory Manual X shear, y shear. 40. A point (4,3) is rotated counterclockwise by an angle of 45°. Find the rotation matrix and the resultant point. 41. Name any three font editing tools. ResEdit, FONTographer, 42. Differentiate serif and sans serif fonts. Give one example Serif fonts has a little decoration at the end of the letter, but serif font has not. Times, new century schoolbook is the examples of serif fonts. Arial, potima are examples for sans serif fonts. 43. Distinguish between window port & view port? A portion of a picture that is to be displayed by a window is known as window port. The display area of the part selected or the form in which the selected part is viewed is known as view port. 44. Define clipping? Clipping is the method of cutting a graphics display to neatly fit a predefined graphics region or the view port 45. What is the need of homogeneous coordinates? To perform more than one transformation at a time, use homogeneous coordinates or matrixes. They reduce unwanted calculations intermediate steps saves time and memory and produce a sequence of transformations. 46. Distinguish between uniform scaling and differential scaling? When the scaling factors sx and sy are assigned to the same value, a uniform scaling is produced that maintains relative object proportions. Unequal values for sx and sy result in a differential scaling that is often used in design application. 47. What is fixed point scaling? The location of a scaled object can be controlled by a position called the fixed point that is to remain unchanged after the scaling transformation. 48. What is Bezier Basis Function? Bezier Basis functions are a set of polynomials, which can be used instead of the primitive polynomial basis, and have some useful properties for interactive curve design. 49. What is surface patch A single surface element can be defined as the surface traced out as two parameters (u, v) take all possible values between 0 and 1 in a two-parameter representation. Such a single surface element is known as a surface patch. 50. Define B-Spline curve?
  • 48. Computer Graphics & Multimedia 2021-22 48 Laboratory Manual A B-Spline curve is a set of piecewise(usually cubic) polynomial segments that pass close to a set of control points. However the curve does not pass through these control points, it only passes close to them. 51. What is a spline? To produce a smooth curve through a designed set of points, a flexible strip called spline is used. Such a spline curve can be mathematically described with a piecewise cubic polynomial function whose first and second derivatives are continuous across various curve section. 52. What are the different ways of specifying spline curve? • Using a set of boundary conditions that are imposed on the spline. • Using the state matrix that characteristics the spline • Using a set of blending functions that calculate the positions along the curve path by specifying combination of geometric constraints on the curve 53. What are the important properties of Bezier Curve? • It needs only four control points • It always passes through the first and last control points • The curve lies entirely within the convex half formed by four control points. 54. Define Projection? The process of displaying 3D into a 2D display unit is known as projection. The projection transforms 3D objects into a 2D projection plane 55. What are the steps involved in 3D transformation? • Modeling Transformation • Viewing Transformation • Projection Transformation • Workstation Transformation 56. What do you mean by view plane? A view plane is nothing but the film plane in camera which is positioned and oriented for a particular shot of the scene. 57. Define projection? The process of converting the description of objects from world coordinates to viewing coordinates is known as projection 58. What you mean by parallel projection? Parallel projection is one in which z coordinates is discarded and parallel lines from each vertex on the object are extended until they intersect the view plane. 59. What do you mean by Perspective projection? Perspective projection is one in which the lines of projection are not parallel. Instead, they all converge at a single point called the center of projection.
  • 49. Computer Graphics & Multimedia 2021-22 49 Laboratory Manual 60. What is Projection reference point? In Perspective projection, the lines of projection are not parallel. Instead, they all converge at a single point called Projection reference point. 61. Define computer graphics animation? Computer graphics animation is the use of computer graphics equipment where the graphics output presentation dynamically changes in real time. This is often also called real time animation. 62. What is tweening? It is the process, which is applicable to animation objects defined by a sequence of points, and that change shape from frame to frame. 63. Define frame? One of the shape photographs that a film or video is made of is known as frame. 64. What is key frame? One of the shape photographs that a film or video is made of the shape of an object is known initially and for a small no of other frames called key frame 65. Define Multimedia Multimedia is the use of the computer to present and combine text, graphics, audio and video with links and tools that lets the user to navigate, interact, create and communicate. 66. What is multimedia PC: A multimedia PC is a computer that has a CD-ROM or DVD drive and supports 8- bit and 16- bit waveform audio recording and playback, MIDI sound synthesis, and MPEG movie watching, with a central processor fast enough and a RAM large enough to enable the user to play and interact with these media in real time, and with a hard disk large enough to store multimedia works that the user can create. 67. Where to use multimedia? Multimedia improves information relation. Multimedia applications include the following: Business Schools Home Public place 68. List out the benefits of multimedia Benefits of multimedia are  Training  Sales  Communications  Medicines 69. What is hypermedia? A set of documents in which a given document can contain text, graphics video and
  • 50. Computer Graphics & Multimedia 2021-22 50 Laboratory Manual audio clips as well as embedded references to other documents world wide web pages are hypermedia documents. 70. What is hypertext? Hyper text is an application of indexing text to provide a rapid search of specific text strings in one or more documents. Hypertext is an integral part of hypermedia documents. In multimedia applications, a hypermedia documents is the basic complex object of which text is a sub- object. Other sub-objects in the basic object include images, sound, and full-motion video. 71. List out the building blocks of multimedia.  Text  Image  Sound  Animation, Video 72. What are the main functions of a multimedia development system? Multimedia development system must perform main three functions as follows:  Input data  Development  Data output Data input from sources such as cameras or musical instruments, application development, and data output to some delivery medium such as a videodisk or CD- ROM. 73. Define Typeface Typeface is measured in point sizes, where one point is approximately 1/72 of an inch. It is a measure of the height of the metal blocks containing letters. 74. Define the following: (i) X-height (ii) Set (iii) Kerning (i.)X-height: The X-height is the measurement of the height of the character X, in other words of the middle bit without any ascender or descender. (ii) Set: The width of the letters is called the set and is fixed relative to the point-size. (iii) Kerning: The spaces between letters in one world (tracking) can be adjusted in a process called kerning. 75. Define the following respective to sound: (i) Waveform (ii) Frequency (iii) Amplitude i) Waveform Sound is produced by the vibration of matter. During the vibration pressure variation are created in the air surrounding it. The pattern of the oscillation is called a waveform. (ii) Frequency
  • 51. Computer Graphics & Multimedia 2021-22 51 Laboratory Manual The frequency of the sound is the reciprocal value of the period. It represents the number of period s in a second and it is measured in Hertz (Hz) or cycles per second. (iii) Amplitude A sound also has amplitude. The amplitude of a sound is a measure of the displacement of the air pressure wave from its, or quiescent state. 76. Define quantization (or) resolution? The resolution (or) quantization of a sample value depends on the number of bits used in measuring the height of the waveform. An 8-bit quantization yields 256 possible values, 16-bit CD-qudra quantization results in over 65536 values. 77. What are the types of sound objects that can be used in multimedia production? There are four types of sound objects that can be used in multimedia production:  Waveform audio  MIDI sound tracks  Compact disc (CD) audio  MP3 files 78. What is MIDI? Musical Instrument Digital Interface (MIDI) is the interface between electronic musical instruments and computers is a small piece of equipment that plugs directly into the computer’s serial port and allows the transmission of music signal. MIDI is considered to be the most compact interface that allows full-scale output. 79. List out the components of MIDI interface. A MIDI interface has two different components:  Hardware  Data format Hardware connects the equipment. It specifies the physical connection between musical instruments, stimulate that a port MIDI port is built into an instrument, specifies a MIDI cable and deals with electronic signals t that are sent over the cable. Data format encodes the information traveling through the hardware MIDI data format includes an instrument –connected data format. The encoding includes, besides the instrument specification, the notion of the beginning and end of a note, basic frequency and sound volume; MIDI data allow an encoding of about 10 octaves, which corresponds to 128 notes. 80. Define the term flicker in video. A periodic fluctuation of brightness perception is called flicker effect. 81. Define Random scan/Raster scan displays? Random scan is a method in which the display is made by the electronic beam which is directed only to the points or part of the screen where the picture is to be drawn.
  • 52. Computer Graphics & Multimedia 2021-22 52 Laboratory Manual The Raster scan system is a scanning technique in which the electrons sweep from top to bottom and from left to right. The intensity is turned on or off to light and unlight the pixel. 82. What is an MPC? The MPC computer is not a hardware unit but rather a standard that includes minimum specifications to turn Intel microprocessor-based computers into multimedia computers. 83. List all the MPC standards There are currently three MPC standards as follows  MPC Level 1  MPC Level 2  MPC Level 3 The standards apply not only to desktop computers but also to increasingly more powerful multimedia laptops. 84. What is configuration of MPC level 1 standards? The MPC level 1 minimum standard workstation consisted of a 16MHz 386SX microprocessor, atleast 2MB of RAM, a 30MB Hard disk, a CD-ROM drive, VGA video (16 colors), an 8-bit audio board, speakers and/or headphones, and Microsoft windows software with the Multimedia Extensions package. 85. Write the configuration of MPC level 2 standards. MPC level 2 minimum standard consisted of a 25MHz 486SX microprocessor with atleast 4MB of RAM, a 3.5-inch high density, a 160 MB or larger hard disk drive, and a CD-ROM drive capable of sustained 300k per second transfer rate with CD- DA outputs and volume control, 16-bit sound capability with microphone input, and a color monitor with display resolution of atleast 640X 480 with 65,536(64k) colors. 86. List out the input devices of multimedia. Input devices for a multimedia system are as follows:  Keyboards  Mouse  Trackball  Touch screen  Magnetic card Encoders and Readers  Graphics Tablets  Scanners  Optical Character Recognition (OCR) devices  Voice Recognition Systems  Digital cameras
  • 53. Computer Graphics & Multimedia 2021-22 53 Laboratory Manual 87. What is a Video disk? Video disk serves as the output of motion pictures and audio. The data are stored in an analog- coded format on the disk. The reproduced data meet the highest quality requirements. Video disk has a diameter of approximately 30cm and stores approximately 2.6 Giga bytes. 88. What is synchronization? Integration of the different media is given through a close relation between information units. This is called synchronization. 89. What is meant by Multimedia User Interface? Multimedia user interface is a computer interface that communicates with users multiple media. 90. Define the following terms: (i) Compression Ratio (ii) Image Quality (i) Compression Ratio: The Compression Ratio represents the size of the original image divided by the size of the compressed image. (ii) Image Quality: Compression ratio typically affects picture quality, the higher the compression ratio, the lower the quality of the decompressed image. 91. What are the higher levels of multimedia communication system (MCS)? The higher layers of the multimedia communication system are divided into two architectural subsystems: • Application subsystem • Transport subsystem. 92. Define collaborative computing environment? The recent infrastructure of networked workstations and pcs, and the availability of audio and video at these end points, makes it easier to people to cooperate and bridge space and time. In this way, network connectivity and endpoint integration of multimedia provide users with a collaborative computing environment. It is generally known as computer supported cooperative work (CSCW). 93. List out the tools for collaborative computing The tools used for collaborative computing are as follows: • Electronic mail • Bulletin boards(e.g. Usenet news) • Screen sharing tools(e.g. show me from sunsoft) • Text-based conferencing systems (e.g. Internet relay chat, CompuServe, America online). • Telephone conference systems. • Conference rooms(e.g. video window from Bellcore) • Video conference systems(e.g.,Mbone tools)