0% found this document useful (0 votes)
12 views96 pages

CG Question Banka

Uploaded by

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

CG Question Banka

Uploaded by

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

SR 22

Dept. : CSD
St. Peter’s Engineering College (Autonomous)
Dullapally (P), Medchal, Hyderabad – 500100. Academic Year
QUESTION BANK 2024-25
Subject Code : AS22-74PC03 Subject : COMPUTER GRAPHICS
Class/Section : B. Tech. Year : III CSD Semester : 1

BLOOMS LEVEL
Remember L1 Understand L2 Apply L3
==Analyze L4 Evaluate L5 Create L6

*****

Q. No Question (s) Marks BL CO


UNIT – I
a)List various application areas of computer graphics.
ANS:1)Education and Training
2)Use in Biology
C312.1
1 3)Use in Entertainment 1M L1
4)Visualization
5) Educational Software
6)Printing Technology
b)What is Bresenham’s line drawing algorithm?
ANS:This algorithm is used for scan converting a line. It was
developed by Bresenham. It is an efficient method because it
involves only integer addition, subtractions, and multiplication
operations. These operations can be performed very rapidly so 1M L2 C312.1
lines can be generated quickly.
In this method, next pixel selected is that one who has the least
distance from true line.

c)What is DDA line algorithm?


ANS:DDA (Digital Differential Analyzer) is a line drawing
algorithm used in computer graphics to generate a line
segment between two specified endpoints. It is a simple and 1M L2 C312.1
efficient algorithm that works by using the incremental
difference between the x-coordinates and y-coordinates of the
two endpoints to plot the line.
d)Define graphics monitors
 ANS:Graphics monitors are specialized computer systems
that are designed for use in graphics-intensive applications
such as video editing, 3D rendering, and scientific
visualization.
Graphics monitors displays that are specifically designed to 1M L1 C312.1
display high-resolution graphics and video. They often have wider
color gamuts, higher refresh rates, and faster response times than
standard computer monitors, which makes them suitable for use in
applications that require fast, smooth graphics rendering.
SR 22

e)Define workstations.
 Workstations are high-performance computers that are
designed to support heavy workloads and are typically used
in professional settings such as studios, design firms, and
research labs. They often have powerful processors, lots of 1M L1 C312.1
RAM, and dedicated graphics cards to support the
demanding needs of graphics-intensive applications.

a)Define Input Devices.


The Input Devices are the hardware that is used to transfer transfers
2 3M L2 C312.1
input to the computer. The data can be in the form of text, graphics,
sound, and text.
b)Explain about application areas of computer graphics. 3M

A: Application of Computer Graphics

Computer-aided design for engineering and architectural


systems etc.
Objects may be displayed in a wireframe
outline form. Multi-window environment is
also favored for producing various zooming
scales and views.
Animations are useful for testing performance.

Presentation Graphics
To produce illustrations that summarize
various kinds of data. Except 2D, 3D graphics
are good tools for reporting more complex
data. L2 C312.1

Computer Art
Painting packages are available. With
cordless, pressure-sensitive stylus, artists can
produce electronic paintings which simulate
different brush strokes, brush widths, and
colors. Photorealistic techniques, morphing
and animations are very useful in commercial
art. For films, 24 frames per second are
required. For video monitor, 30 frames per
secondare required.

Entertainment
Motion pictures, Music videos, and TV shows, Computer
games

c)Explain about Raster scan systems 3M

A: Raster-Scan L2 C312.1

The electron beam is swept across the screen one


SR 22

row at a time from top to bottom. As it moves


across each row, the beam intensity is turned on
and off to create a pattern of illuminated spots.
This scanning process is called refreshing. Each
complete scanning of a screen is normally called
a frame.

The refreshing rate, called the frame rate, is


normally 60 to 80 frames per second, or described
as 60 Hz to 80 Hz.

Picture definition is stored in a memory area called


the frame buffer. This frame buffer stores the
intensity values for all the screen points. Each
screen point is called a pixel (pictureelement).

On black-and-white systems, the frame buffer


storing the values of the pixels is called a bitmap.
Each entry in the bitmap is a 1-bit data which
determines the on (1) and off (0) of the intensity
of the pixel.

On color systems, the frame buffer storing the values of


the pixels is called a pixmap.

d)Explain about random scan systems. 3M


A: The CRT's electron beam is directed only to the
parts of the screen where a picture is to be drawn.
The picture definition is stored as a set of line-
drawing commands in a refresh display file or a
refresh buffer in memory.
L2 C312.1
Random-scan generally have higher resolution
than raster systems and can produce smoothline
drawings, however it cannot display realistic
shaded scenes.

 Random Scan System uses an electron beam which


SR 22

operates like a pencil to create a line image on the CRT


screen. The picture is constructed out of a sequence of
straight-line segments.
 Each line segment is drawn on the screen by directing the
beam to move from one point on the screen to the next,
where its x & y coordinates define each point.
 After drawing the picture. The system cycles back to the
first line and design all the lines of the image 30 to 60 time
each second

Advantages:

1. A CRT has the electron beam directed only to the parts of


the screen where an image is to be drawn.
2. Produce smooth line drawings.
3. High Resolution
Disadvantages:

1. Random-Scan monitors cannot display realistic shades


scenes.

e)Explain about Scan line algorithm 3M L2 C312.1


SR 22

a)Explain about random and raster scan systems.

Raster-Scan
The electron beam is swept across the screen one
row at a time from top to bottom. As it moves
across each row, the beam intensity is turned on
and off to create a pattern of illuminated spots.
This scanning process is called refreshing. Each
complete scanning of a screen is normally called
a frame.

The refreshing rate, called the frame rate, is


normally 60 to 80 frames per second, or described
as 60 Hz to 80 Hz.
3 5M L5 C312.1
Picture definition is stored in a memory area called
the frame buffer. This frame buffer stores the
intensity values for all the screen points. Each
screen point is called a pixel (pictureelement).

On black-and-white systems, the frame buffer


storing the values of the pixels is called a bitmap.
Each entry in the bitmap is a 1-bit data which
determines the on (1) and off (0) of the intensity
of the pixel.

On color systems, the frame buffer storing the values of


the pixels is called a pixmap
(Though nowadays many graphics libraries name it as bitmap
SR 22

too). Each entry in the pixmap


occupies a number of bits to represent the color of
the pixel. For a true color display, the number of
bits for each entry is 24 (8 bits per red/green/blue
channel, each channel 28=256 levels of intensity
value, ie. 256 voltage settings for each of the
red/green/blue electron guns).
Advantages:

1. Realistic image
2. Million Different colors to be generated
3. Shadow Scenes are possible.

Disadvantages:
1. Low Resolution
2. Expensive
3.

Random-Scan (Vector Display)


The CRT's electron beam is directed only to the
parts of the screen where a picture is to be drawn.
The picture definition is stored as a set of line-
drawing commands in a refresh display file or a
refresh buffer in memory.

Random-scan generally have higher resolution


than raster systems and can produce smoothline
drawings, however it cannot display realistic
shaded scenes.

 Random Scan System uses an electron beam which


operates like a pencil to create a line image on the CRT
screen. The picture is constructed out of a sequence of
straight-line segments.
 Each line segment is drawn on the screen by directing the
beam to move from one point on the screen to the next,
where its x & y coordinates define each point.
 After drawing the picture. The system cycles back to the
first line and design all the lines of the image 30 to 60 time
each second
SR 22

Advantages:

4. A CRT has the electron beam directed only to the parts of


the screen where an image is to be drawn.
5. Produce smooth line drawings.
6. High Resolution

Disadvantages:

2. Random-Scan monitors cannot display realistic shades


scenes.

b)Explain DDA algorithm 5M


A:1)DDA (Digital Differential Analyzer) is a line drawing
algorithm used in computer graphics to generate a line
segment between two specified endpoints. It is a simple
and efficient algorithm that works by using the incremental
difference between the x-coordinates and y-coordinates of
the two endpoints to plot the line.
2)DDA stands for Digital Differential Analyzer. It is an
incremental method of scan conversion of line. In this
method calculation is performed at each step but by using
results of previous steps.
Straight line equation is y=mx+b.
If the line has two end points, A(x1,y1),B(y1,y2) L4 C312.1
Slope of line is m=y2-y1/x2-x1 i.e.,m=dy/dx.
Case1: if m<=1,
Xn=x1+1, yn=y1+m
Case2: if m>1
Xn=x1+1/m, yn=y1+1
The steps involved in DDA line generation algorithm are:
1. Start Algorithm.
2. Declare x1,y1,x2,y2,dx,dy,x,y as integer variables.
3. Input the two endpoints of the line segment, (x1,y1) and
(x2,y2).
SR 22

4. Calculate the difference between the x-coordinates and y-


coordinates of the endpoints as dx and dy respectively.
i.e., dx=x2-x1
dy=y2-y1
5. Calculate the slope of the line as m = dy/dx.
6. Set the initial point of the line as (x1,y1).
7. Loop through the x-coordinates of the line, incrementing by
one each time, and calculate the corresponding y-
coordinate using the equation y = y1 + m(x – x1).
8. Plot the pixel at the calculated (x,y) coordinate.
9. Repeat steps 7 and 8 until the endpoint (x2,y2) is reached.

10.

c)Explain Bresenham’s algorithm 5M


• 1)This algorithm is used for scan converting a line. It was
developed by Bresenham. It is an efficient method because
it involves only integer addition, subtractions, and
multiplication operations. These operations can be
performed very rapidly so lines can be generated quickly.
.2) Bresenham's Line Algorithm can draw circle and curves
with more accurate than DDA Algorithm.
3)This algorithm is very efficient since it use only
incremental integer calculations.
L4 C312.1
Instead of calculating the non-integral values of D1 and D2
for decision of pixel location, it computes a value, p, which
is defined as:
p = (D2-D1)* horizontal length of the line if p>0, it means
D1 is smaller than D2, and we can determine the pixel
location accordingly However, the computation of p is very
easy.
The initial value of p is 2 * vertical height of the line -
horizontal length of the line. At succeeding x locations, if p
has been smaller than 0, then, we increment p by 2 *
vertical height of the line, otherwise we increment p by 2 *
SR 22

(vertical height of the line - horizontal length of the line)


All the computations are on integers.
Bresenham's Line Algorithm:
Step1: Start Algorithm
Step2: Declare variable x1,x2,y1,y2,d,i1,i2,dx,dy
Step3: Enter value of x1,y1,x2,y2
Where x1,y1are coordinates of starting point
And x2,y2 are coordinates of Ending point
Step4: Calculate dx = x2-x1
Calculate dy = y2-y1
Calculate i1=2*dy
Calculate i2=2*(dy-dx)
Calculate d=i1-dx
Step5: Consider (x, y) as starting point and xendas
maximum possible value of x.
If dx < 0
Then x = x2
y = y2
xend=x1
If dx > 0
Then x = x1
y = y1
xend=x2
Step6: Generate point at (x,y)coordinates.
Step7: Check if whole line is generated.
If x > = xend
Stop.
Step8: Calculate co-ordinates of the next pixel
If d < 0
Then d = d + i1
If d ≥ 0
Then d = d + i2
Increment y = y + 1
Step9: Increment x = x + 1
Step10: Draw a point of latest (x, y) coordinates
Step11: Go to step 7
Step12: End of Algorithm

d)Explain boundary fill algorithm 5M


A:1)Boundary Fill Algorithm starts at a pixel inside the
polygon to be filled and paints the interior proceeding
outwards towards the boundary.
2) This algorithm works only if the color with which the
L4 C312.1
region has to be filled and the color of the boundary of
the region are different.
3)If the boundary is of one single color, this approach
proceeds outwards pixel by pixel until it hits the
boundary of the region.
SR 22

4)Boundary Fill Algorithm is recursive in nature. It takes


an interior point(x, y), a fill color, and a boundary color
as the input.
5)The algorithm starts by checking the color of (x, y). If
it’s color is not equal to the fill color and the boundary
color, then it is painted with the fill color and the function
is called for all the neighbours of (x, y).
6)If a point is found to be of fill color or of boundary
color, the function does not call its neighbours and
returns.
7)This process continues until all points up to the
boundary color for the region have been tested.
8)The boundary fill algorithm can be implemented by 4-
connected pixels or 8-connected pixels.
9)4-connected pixels : After painting a pixel, the function
is called for four neighbouring points. These are the pixel
positions that are right, left, above, and below the current
pixel. Areas filled by this method are called 4-connected.
Below given is the algorithm :
Algorithm :
void boundaryFill4(int x, int y, int fill_color,int
boundary_color)
{
if(getpixel(x, y) != boundary_color &&
getpixel(x, y) != fill_color)
{
putpixel(x, y, fill_color);
boundaryFill4(x + 1, y, fill_color, boundary_color);
boundaryFill4(x, y + 1, fill_color, boundary_color);
boundaryFill4(x - 1, y, fill_color, boundary_color);
boundaryFill4(x, y - 1, fill_color, boundary_color);
}
}

e)Explain flood-fill algorithm 5M


1)In this method, a point or seed which is inside region
is selected. This point is called a seed point.
2)Then four connected approaches or eight connected
approaches is used to fill with specified color.
3)The flood fill algorithm has many characters similar
to boundary fill.
L4 C312.1
4)But this method is more suitable for filling multiple
colors boundary. When boundary is of many colors and
interior is to be filled with one color we use this
algorithm.
5)In fill algorithm, we start from a specified interior
point (x, y) and reassign all pixel values are currently
set to a given interior color with the desired color. Using
SR 22

either a 4-connected or 8-connected approaches, we


then step through pixel positions until all interior points
have been repainted.
Disadvantage:
1. Very slow algorithm
2. May be fail for large polygons
3. Initial pixel required more knowledge about
surrounding pixels.
Algorithm:
Procedure floodfill (x, y,fill_ color, old_color: integer)
If (getpixel (x, y)=old_color)
{
setpixel (x, y, fill_color);
fill (x+1, y, fill_color, old_color);
fill (x-1, y, fill_color, old_color);
fill (x, y+1, fill_color, old_color);
fill (x, y-1, fill_color, old_color);
}
}

a)Explain about mid-point circle algorithm. 10M


1)The mid-point circle drawing algorithm is an algorithm
used to determine the points needed for rasterizing a circle.
2)We use the mid-point algorithm to calculate all the
perimeter points of the circle in the first octant and then
print them along with their mirror points in the other
octants. This will work because a circle is symmetric about
its center.
Given a circle centered at (0,0) and radius r and a point p(x,y)
F(p) = x2 + y2 – r2
if F(p)<0, the point is inside the circle
F(p)=0, the point is on the perimeter
F(p)>0, the point is outside the circle
4 Given, L4 C312.1
Center point of circle=(X0, Y0)
Radius of Circle=R
The point generation using midpoint circle drawing algorithm
involves the following
Steps:
Step-1:
Assign the starting point coordinates(X0, Y0)) as
 X0 = 0

 Y0 = R
Step-2:
Calculate the value of initial decision parameter PK as
SR 22

Pk=1-R
Step-3:
i)Suppose the current point is (Xk, Yk) and the next point is (Xk+1,
Yk+1).
ii)Find the next point of the first octant depending on the value of
decision parameter Pk.
Follow the below two cases:

Step-04:

If the given centre point (X0, Y0) is not (0, 0), then do the following
and plot the point-
 Xplot = Xc + X0

 Yplot = Yc + Y0

Here, (Xc, Yc) denotes the current value of X and Y coordinates.

Step-05:

Keep repeating Step-03 and Step-04 until Xplot >= Yplot.

Step-06:

Step-05 generates all the points for one octant.


To find the points for other seven octants, follow the eight
symmetry property of circle.
SR 22

b)Explain about application areas of computer graphics 10M


1. Education and Training: Computer-generated model of the
physical, financial and economic system is often used as
educational aids. Model of physical systems, physiological
system, population trends or equipment can help trainees to
understand the operation of the system. For some training
applications, particular systems are designed. For example
Flight Simulator.
L2 C312.1
Flight Simulator: It helps in giving training to the pilots of
airplanes. These pilots spend much of their training not in a real
aircraft but on the ground at the controls of a Flight Simulator.
Advantages:
1. Fuel Saving
2. Safety
3. Ability to familiarize the training with a large number of the
world's airports.
SR 22

2. Use in Biology: Molecular biologist can display a picture of


molecules and gain insight into their structure with the help of
computer graphics.
3. Computer-Generated Maps: Town planners and
transportation engineers can use computer-generated maps
which display data useful to them in their planning work.
4. Architect: Architect can explore an alternative solution to
design problems at an interactive graphics terminal. In this way,
they can test many more solutions that would not be possible
without the computer.
5. Presentation Graphics:
Example of presentation Graphics are bar charts, line graphs,
pie charts and other displays showing relationships between
multiple parameters.
Presentation Graphics is commonly used to summarize
Financial Reports , Statistical Reports , Mathematical Reports,
Scientific Reports , Economic Data for research reports ,
Managerial Reports ,Consumer Information Bulletins And
other types of reports
6. Computer Art:
Computer Graphics are also used in the field of commercial arts.
It is used to generate television and advertising commercial.
7. Entertainment: Computer Graphics are now commonly used
in making motion pictures, music videos and television shows.
8. Visualization: It is used for visualization of scientists,
engineers, medical personnel, business analysts for the study of
a large amount of information.
9. Educational Software: Computer Graphics is used in the
development of educational software for making computer-
aided instruction.
10. Printing Technology: Computer Graphics is used for
printing technology and textile design.

c)Explain about midpoint ellipse algorithm. 10M


1)Ellipse is defined as the geometric figure which is the set
of all points on a plane whose distance from two fixed
points known as the foci remains a constant.
2)It consists of two axes: major and minor axes where the
major axis is the longest diameter and the minor axis is the
shortest diameter. L4 C312.1
3)Unlike a circle, the ellipse has a four-way symmetry
property which means that only the quadrants are
symmetric while the octants are not.
Mid-point Ellipse algorithm is used to draw an ellipse in
computer graphics.
SR 22

In computer graphics, the mid-point ellipse algorithm is


an incremental method of drawing an ellipse. It is very
similar to the mid-point algorithm used in the generation of
a circle.

Midpoint ellipse algorithm plots(finds) points of an ellipse


on the first quadrant by dividing the quadrant into two
regions.
Each point(x, y) is then projected into other three quadrants
(-x, y), (x, -y), (-x, -y) i.e. it uses 4-way symmetry.
The midpoint ellipse method is applied throughout the
first quadrant in two parts. Now let us take the start position
at (0,ry) and step along the ellipse path in clockwise order
throughout the first quadrant.
Ellipse function can be defined as:
fellipse(x,y)=ry2x2+rx2y2-rx2 ry2
According to this there are some properties which have
been generated that are:
1. fellipse(x,y)<0 which means (x,y) is inside the ellipse
boundary.
2. fellipse(x,y)>0 which means (x,y) is outside the ellipse
boundary.
3. fellipse(x,y)=0 which means (x,y) is on the ellipse boundary.
Initial decision parameters:
i)In Region 1 the initial value of a decision parameter is
obtained by giving a starting
position = (0,ry).
SR 22

i.e. p10=ry2 +1/4rx2-rx2ry


ii)When we enter into region 2 the initial position is
taken as the last position selected in Region 1 and the
initial decision parameter in Region 2 is then:
p20=ry2(x0+1/2)2+rx2(y0-1)2-rx2 ry2
Algorithm Steps:

1)Take the input and ellipse centre and obtain the first
point on an ellipse centered on the origin as a (x,y 0)=
(0,ry).
2)Now calculate the initial decision parameter in region
1 as:
p10=ry2+1/4rx2-rx2ry
3)At each xk position in region 1 perform the following
task. If p1k<0 then the next point along the ellipse
centered on (0,0) is (xk+1,yk).
i.e. p1k+1=p1k+2 ry2xk+1+ry2
Otherwise, the next point along the circle is (xk+1,yk -1)
i.e. p1k+1=p1k+2ry2xk+1 – 2rx2yk+1+ry2
4)Now, again calculate the initial value in region 2 using
the last point (x0,y0) calculated in a region 1 as
: p20=ry2(x0+1/2)2+rx2(y0-1)2-rx2ry2
5)At each yk position in region 2 starting at k
=0 perform the following task. If p2k<0 the next point
along the ellipse centered on (0,0) is (xk , yk-1)
i.e. p2k+1=p2k-2rx2yk+1+rx2
Otherwise the next point along the circle will
be (xk+1,yk -1)
i.e. p2k+1 =p2k+2ry2 xk+1 -2rx2yk+1+rx2
6)Now determine the symmetric points in another three
quadrants.
7)Plot the coordinate value as: x=x+xc , y=y+yc
8)Repeat the steps for region 1 until 2ry2 x>=2rx2y.
Advantages:
The Midpoint Ellipse Algorithm is widely used in
computer graphics due to its:-
SR 22

Efficiency: Integer calculations only, no floating-point


or trigonometric functions.-
Accuracy: Produces smooth, symmetrical ellipses.-
Speed: Fast execution, suitable for real-time graphics
applications.
This algorithm is commonly used in graphics libraries,
CAD software, and games to draw ellipses, circles, and
arcs.
Disadvantages:
This algorithm is time consuming.

Q. No Question (s) Marks BL CO


UNIT – II
a)What is scaling in 2-D geometrical?
Scaling To change the size of an object, scaling
transformation is used.
In the scaling process, you either increase or
1 1M L1 C312.2
decrease the dimensions of the object.
Scaling can be achieved by multiplying the
original coordinates of the object with the scaling
factor to get the desired result.
SR 22

b)What is Translation in 2-D geometrical?


1) 2-d Translation is a process of moving an object
from one position to another in a two dimensional
plane.
2) You can translate a point in 2D by adding
translation coordinate (tx, ty) to the original
coordinate (X, Y) to get the new coordinate (X’,
Y’).
1M L1 C312.2

c) What is rotation in 2-D geometrical?


Rotation is a process of rotating an object with
respect to an angle in a two dimensional plane. 1M L1 C312.2
In rotation, we rotate the object at particular angle
θ (theta) from its origin.
SR 22

d) What is reflection in 2-D geometrical?


Reflection is the mirror image of original object.
In other words, we can say that it is a rotation
operation with 180°.
In reflection transformation, the size of the object
does not change.

1M L1 C312.2

e) What is Shear transformations in 2-D geometricals?


Shear :
A transformation that slants the shape of an object 1M L1 C312.2
is called the shear transformation.
There are two shear transformations X-Shear and
YShear.
SR 22

a)Explain the viewing pipeline in 2-d geometrical.


We know that the picture is stored in the computer memory
using any convenient Cartesian co-ordinate system, referred to
as World Co-Ordinate System (WCS). However, when picture
is displayed on the display device it is measured in Physical
Device Co-Ordinate System (PDCS) corresponding to the
display device.
• Converting world co-ordinates to viewing co-ordinates.
• Normalizing viewing co-ordinates.
2 • Converting normalized viewing co-ordinates to device co- 3M L2 C312.2
ordinates.

b)Explain window to viewport coordinate transformations in 2- 3M


D geometrical.
1. Window-to-Viewport transformation is the process of
transforming a twodimensional, world-coordinate scene to
device coordinates.
2. In particular, objects inside the world or clipping window are L2 C312.2
mapped to the viewport. The viewport is displayed in the
interface window on the screen.
3. In other words, the clipping window is used to select the part
of the scene that is to be displayed. The viewport then positions
the scene on the output device.
SR 22

c)Explain viewing coordinate reference frame. 3M


 We can obtain reference frame in any direction and at any
position.
 For handling such condition first of all we translate reference
frame origin to standard reference frame origin and then we rotate
it to align it to standard axis.
 In this way we can adjust window in any reference frame.
 this is illustrate by following transformation matrix
𝐌𝐰𝐜,𝐯𝐜 = 𝐑𝐓
 Where T is translation matrix and R is rotation matrix.

L2 C312.2

d)What is clipping and its applications. 3M


Generally, any procedure that identifies those portions of a picture
that are either inside or outside of a specified region of space is
referred to as a clipping algorithm, or simply clipping. The region
against which an object is to clip is called a clip window. L1 C312.2
 It can be used for displaying particular part of the picture on
display screen.
 Identifying visible surface in 3D views.
SR 22

e)What is point clipping and line clipping?


Point clipping tells us whether the given point (X, Y) is within
the given window or not; and decides whether we will use the
minimum and maximum coordinates of the window. The X-
coordinate of the given point is inside the window, if X lies in
between Wx1 ≤ X ≤ Wx2. Same way, Y coordinate of the given
point is inside the window, if Y lies in between Wy1 ≤ Y ≤ Wy2.

3M L1 C312.2
Line Clipping The concept of line clipping is same as point
clipping. In line clipping, we will cut the portion of line which is
outside of window and keep only the portion that is inside the
window.

a)Explain Scaling and translation in 2-D geometricals.


Scaling:
Scaling To change the size of an object, scaling
transformation is used.
In the scaling process, you either increase or
decrease the dimensions of the object.
Scaling can be achieved by multiplying the
original coordinates of the object with the scaling
factor to get the desired result.
Let us assume that the original coordinates are (X,
Y), the scaling factors are (SX, SY), and the
3 5M L2 C312.2
produced coordinates are (X’, Y’).
This can be mathematically represented as shown
below –
X' = X . SX and Y' = Y . SY
The scaling factor SX, SY scales the object in X
and Y direction respectively.
The scaling factor SX, SY scales the object in X
and Y direction respectively.
The above equations can also be represented in
matrix form as below −
(X′Y′)=(XY)[Sx00Sy](X′Y′)=(XY)[Sx00Sy]
SR 22

OR
P’ = P . S
Where S is the scaling matrix.

The scaling process is shown in the following


figure

Translation:
1) 2-d Translation is a process of moving an object
from one position to another in a two dimensional
plane.
2) You can translate a point in 2D by adding
translation coordinate (tx, ty) to the original
coordinate (X, Y) to get the new coordinate (X’,
Y’).
SR 22

We translate two dimensional point by adding


translation distance 𝒕𝒙 and 𝒕𝒚 to the original
coordinate position (𝒙, 𝒚) to move at new position
(𝒙 ′ , 𝒚 ′ )as:
𝒙 ′ = 𝒙 + 𝒕𝒙 & 𝒚 ′ = 𝒚 + 𝒕𝒚

Translation distance pair (𝒕𝒙,𝒕𝒚) is called a


Translation Vector or ShiftVector.
 We can represent it into single matrix equation
in column vector as;
𝑷′=𝑷+𝑻

 We can also represent it in row vector form as:


𝑷′=𝑷+𝑻
[𝒙′ 𝒚′] = [𝒙 𝒚] + [𝒕𝒙 𝒕𝒚]

b)Explain rotation, reflection, and Shear transformations in 2- 5M


D geometricals.
Rotation:
Rotation:
Rotation is a process of rotating an object with
respect to an angle in a two dimensional plane.
In rotation, we rotate the object at particular angle
θ (theta) from its origin.
Positive value of rotation angle defines counter L2 C312.2
clockwise rotation and negative value of rotation
angle defines clockwise rotation.
From the following figure, we can see that the
point P(X, Y) is located at angle φ from the
horizontal X coordinate with distance r from the
origin. Let us suppose you want to rotate it at the
angle θ. After rotating it to a new location, you
will get a new point P’ (X’, Y’).
SR 22

Reflection:
Reflection is the mirror image of original object.
In other words, we can say that it is a rotation
operation with 180°.
In reflection transformation, the size of the object
does not change.
The following figures show reflections with
respect to X and Y axes, and about the origin
respectively.

Shear transformations:
A transformation that slants the shape of an object
is called the shear transformation.
There are two shear transformations X-Shear and
YShear.
One shifts X coordinates values and other shifts Y
coordinate values. However; in both the cases only
one coordinate changes its coordinates and other
preserves its values.
Shearing is also termed as Skewing.
SR 22

X-Shear The X-Shear preserves the Y coordinate


and changes are made to X coordinates, which
causes the vertical lines to tilt right or left as
shown in below figure.

c)Explain the Sutherland-Hodgeman polygon clipping 5M


L4 C312.2
algorithm.
SR 22

d)Explain viewing pipeline in 2-D geometrical. 5M


The Viewing Transformation Pipeline:-
1)We know that the picture is stored in the computer memory
using any convenient Cartesian co-ordinate system, referred to
as World Co-Ordinate System (WCS).
2)However, when picture is displayed on the display device it is
measured in Physical Device Co-Ordinate System (PDCS)
corresponding to the display device.

3)Therefore, displaying an image of a picture involves mapping


the co-ordinates of the Points and lines that form the picture into
L2 C312.2
the appropriate physical device co-ordinate where the image is
to be displayed.
4)This mapping of co-ordinates is achieved with the use of
coordinate transformation known as viewing transformation.
5)The viewing transformation which maps picture co-ordinates
in the WCS to display co-ordinates in PDCS is performed by the
following transformations.
• Converting world co-ordinates to viewing co-ordinates.
• Normalizing viewing co-ordinates.
• Converting normalized viewing co-ordinates to device co-
ordinates.
SR 22

e)Explain Cohen-Sutherland algorithms. 5M


This algorithm uses the clipping window as shown in the
following figure. The minimum coordinate for the clipping
region is (XWmin,YWmin)(XWmin,YWmin) and the maximum
coordinate for the clipping region is
(XWmax,YWmax)(XWmax,YWmax).

L4 C312.2
SR 22

There are 3 possibilities for the line –


• Line can be completely inside the window (This line should be
accepted).
• Line can be completely outside of the window (This line will be
completely removed from the region).
• Line can be partially inside the window (We will find
intersection point and draw only that portion of line that is
inside region).
a)Explain window to the viewport coordinate transformations 10M
in 2-D geometrical.
window to viewport transformation.
1. A world-coordinate area selected for display is called a
window.
2. In computer graphics, a window is a graphical control
4 L5 C312.2
element.
Viewport:
1. An area on a display device to which a window is
mapped is called a viewport.
2. A viewport is a polygon viewing region in computer
graphics. The viewport is an area expressed in
SR 22

rendering-device-specific coordinates, e.g. pixels for


screen coordinates, in which the objects of interest are
going to be rendered.
Window to viewport transformation:
1. Window-to-Viewport transformation is the process of
transforming a twodimensional, world-coordinate scene
to device coordinates.
2. In particular, objects inside the world or clipping
window are mapped to the viewport. The viewport is
displayed in the interface window on the screen.
3. In other words, the clipping window is used to select
the part of the scene that is to be displayed. The viewport
then positions the scene on the output device.
4. Example:

1. This transformation involves developing formulas


that start with a point in the world window, say (xw,
yw).
2. . The formula is used to produce a corresponding
point in viewport coordinates, say (xv, yv). We would
like for this mapping to be "proportional" in the
sense that if xw is 30% of the way from the left edge
of the world window, then xv is 30% of the way from
the left edge of the viewport.
3. Similarly, if yw is 30% of the way from the bottom
edge of the world window, then yv is 30% of the way
from the bottom edge of the viewport. The picture
below shows this proportionality.

b)Explain Cohen-Sutherland algorithms. 10M


This algorithm uses the clipping window as shown in the
L4 C312.2
following figure. The minimum coordinate for the clipping
region is (XWmin,YWmin)(XWmin,YWmin) and the maximum
SR 22

coordinate for the clipping region is


(XWmax,YWmax)(XWmax,YWmax).

Formula to check binary digits:- TBRL which can be


defined as top, bottom, right, and left
SR 22

accordingly.

There are 3 possibilities for the line –


• Line can be completely inside the window (This line should be
accepted).
• Line can be completely outside of the window (This line will be
completely removed from the region).
• Line can be partially inside the window (We will find
intersection point and draw only that portion of line that is
inside region).
Algorithm of Cohen Sutherland Line Clipping:
Step1:Calculate positions of both endpoints of the line
Step2:Perform OR operation on both of these end-
points
Step3:If the OR operation gives 0000
Then
line is considered to be visible
else
Perform AND operation on both endpoints
If And ≠ 0000
then the line is invisible
else
And=0000
Line is considered the clipped case.
Step4:If a line is clipped case, find an intersection with
boundaries of the window
m=(y2-y1 )(x2-x1)
(a) If bit 1 is "1" line intersects with left boundary of
rectangle window
y3=y1+m(x-X1)
where X = Xwmin
where Xwminis the minimum value of X co-
ordinate of window
(b) If bit 2 is "1" line intersect with right boundary
y3=y1+m(X-X1)
where X = Xwmax
where X more is maximum value of X co-
ordinate of the window
(c) If bit 3 is "1" line intersects with bottom boundary
X3=X1+(y-y1)/m
where y = ywmin
SR 22

ywmin is the minimum value of Y co-ordinate of


the window
(d) If bit 4 is "1" line intersects with the top boundary
X3=X1+(y-y1)/m
where y = ywmax
ywmax is the maximum value of Y co-ordinate
of the window
Advantage of Cohen Sutherland Line Clipping:
1. It calculates end-points very quickly and rejects and
accepts lines quickly.
2. It can clip pictures much large than screen size.

c)Explain Sutherland-Hodgeman polygon clipping algorithm. 10M

L4 C312.2
SR 22

Some Problems With This Algorithm


1. This algorithm does not work if the clip window is not convex.
2. If the polygon is not also convex, there may be some dangling
edges.
SR 22

Q. No Question (s) Marks BL CO


UNIT – III
a)what is the Spline curve?
A:A spline curve in computer graphics is a piecewise-defined
1 1M L1 C312.3
curve that is used to create smooth and flexible shapes.

b)Write a short notes on polygon meshes.


A: Polygon meshes are a fundamental representation of 3D
shapes in computer graphics and modeling. They consist of
vertices, edges, and faces that together define the shape of a 3D 1M L4 C312.3
object.

c)What is Interpolation spline curve?


A:An interpolation spline curve is a type of spline that passes 1M L1 C312.3
exactly through a set of predefined control points.
d)What is the Approximation spline curve?
A: An approximation spline curve is a type of spline that does 1M L1 C312.3
not necessarily pass through each control point.
e)What is meant by Quadric surfaces?
A:• A frequently used class of objects are the quadric
surfaces, which are described with second-degree
equations (quadratics). 1M L2 C312.3
• They include 1. Spheres, 2. Ellipsoids, 3. Paraboloids,
4. Hyperboloids etc

a)Write a short notes on Polygon surfaces.


A:Objects are represented as a collection of surfaces. 3D
object representation is divided into two categories.
 Boundary Representations (B-reps) − It describes a 3D
2 3M L4 C312.3
object as a set of surfaces that separates the object
interior from the environment.
 Space–partitioning representations − It is used to
describe interior properties, by partitioning the spatial
SR 22

region containing an object into a set of small, non-


overlapping, contiguous solids (usually cubes).
The most commonly used boundary representation for a
3D graphics object is a set of surface polygons that
enclose the object interior.
The polygon surfaces are common in design and solid-
modeling applications, since their wireframe display can
be done quickly to give general indication of surface
structure. Then realistic scenes are produced by
interpolating shading patterns across polygon surface to
illuminate.

b)Write a short notes on polygon tables 3M

L4 C312.3

c)Write a short notes on Hermite curve. 3M

1)A Hermite curve is a spline where every piece is a third degree


polynomial defined in Hermite form: that is, by its values and
initial derivatives at the end points of the equivalent domain
interval.
2)Cubic Hermite splines are normally used for interpolation of
L4 C312.3
numeric values defined at certain dispute values x1 ,x2,x3, …..xn, to
achieve a smooth continuous function.
3)The data should have the preferred function value and derivative
at each Xk. The Hermite formula is used to every interval (Xk,
Xk+1) individually.

d)Write a short notes on Quadric surfaces. 3M


• A frequently used class of objects are the quadric
surfaces, which are described with second-degree
L2 C312.3
equations (quadratics).
• They include 1. Spheres, 2. Ellipsoids, 3. Paraboloids,
4. Hyperboloids etc
SR 22

Sphere • In Cartesian coordinates, a spherical surface


with radius r centered on the coordinate origin is defined
as the set of points (x, y, z) that satisfy the equation.

Sphere in parametric form


• We can also describe the spherical surface in parametric
form, using latitude and longitude angles.

e)Write a short notes on polygon meshes.


A:3D surfaces and solids can be approximated by a set of
polygonal and line elements. Such surfaces are called polygonal
meshes.
In polygon mesh, each edge is shared by at most two polygons.
The set of polygons or faces, together form the “skin” of the
object.
This method can be used to represent a broad class of 3M L4 C312.3
solids/surfaces in graphics. A polygonal mesh can be rendered
using hidden surface removal algorithms. The polygon mesh can
be represented by three ways −
 Explicit representation
 Pointers to a vertex list
 Pointers to an edge list

a)Write about B-spline curve and its properties.


A:1) B-spline curve, the only a specific segment of the curve-
shape gets changes or affected by the changing of the
corresponding location of the control points.
3 5M L2 C312.3
2)In the B-spline curve, the control points impart local control
over the curve-shape rather than the global control like Bezier-
curve.
SR 22

B-spline curve shape before changing the position of control


point P1 –

B-spline curve shape after changing the position of control


point P1 –

B-splines curves are independent of the number of control points


and made up of joining the several segments smoothly, where each
segment shape is decided by some specific control points that
come in that region of segment. Consider a curve given below –

Properties of B-spline Curve :


 Each basis function has 0 or +ve value for all parameters.

 Each basis function has one maximum value except for


k=1.
SR 22

 The degree of B-spline curve polynomial does not depend


on the number of control points which makes it more
reliable to use than Bezier curve.
 B-spline curve provides the local control through control
points over each segment of the curve.
 The sum of basis functions for a given parameter is one.

b)Explain about Hermite curve. 5M

A:1)A Hermite curve is a spline where every piece is a third degree


polynomial defined in Hermite form: that is, by its values and
initial derivatives at the end points of the equivalent domain
interval.
2)Cubic Hermite splines are normally used for interpolation of
numeric values defined at certain dispute values x1 ,x2,x3, …..xn, to
achieve a smooth continuous function.
3)The data should have the preferred function value and derivative
at each Xk. The Hermite formula is used to every interval (Xk,
Xk+1) individually.
4)The resulting spline become continuous and will have first
derivative.
5)If represents a parametric cubic point function for the curve L4 C312.3
section between control points Pk and P, then boundary conditions
that define the Hermite curve section are

with DPk and DPk+1 specifying the value for parametric


derivatives(slope of the curve) at control points Pk and Pk+1.
The resulting Hermite curve is something like the below:
SR 22

c)Explain about Bezier curve and its properties. 5M

1)Bezier curve is discovered by the French


engineer Pierre Bézier.

2) These curves can be generated under the control of


other points. Approximate tangents by using control
points are used to generate curve. 3)The Bezier curve
can be represented mathematically as:

L2 C312.3
SR 22

4) It is an approximate spline curve. A bezier curve is


defined by the defining polygon. It has no properties
that make them highly useful and convenient for curve
and surface design.

5) Different types of curves are Simple, Quadratic, and


Cubic.

1. Simple curve: Simple bezier curve is a straight


line from the point.
2. Quadratic curve: Quadratic bezier curve is
determined by three control points.
3. . Cubic curve: The cubic bezier curve is
determined by four control points.

d)Explain about spline representation. 5M

L2 C312.3
SR 22
SR 22

e)Difference between Bezier curve and the B-spline curve. 5M


L4 C312.3

4 a)Explain about Bezier curve and B-spline curves. 10M L2 C312.3


SR 22

 Bezier Curves:
1)Bezier curve is discovered by the French
engineer Pierre Bézier.

2) These curves can be generated under the control of


other points. Approximate tangents by using control
points are used to generate curve. 3)The Bezier curve
can be represented mathematically as:

4) It is an approximate spline curve. A bezier curve is


defined by the defining polygon. It has no properties
that make them highly useful and convenient for curve
and surface design.

5) Different types of curves are Simple, Quadratic, and


Cubic.

4. Simple curve: Simple bezier curve is a straight


line from the point.
5. Quadratic curve: Quadratic bezier curve is
determined by three control points.
SR 22

6. . Cubic curve: The cubic bezier curve is


determined by four control points.

Properties of Bezier Curve:


1)Bezier curves are widely available and used in various CAD
systems, in general graphics packages such as GL
2) They generally follow the shape of the control polygon, which
consists of the segments joining the control points.
3) They always pass through the first and last control points.
4)They are contained in the convex hull of their defining control
points.
5)The degree of the polynomial defining the curve segment is one
less that the number of defining polygon point. Therefore, for 4
control points, the degree of the polynomial is 3, i.e. cubic
polynomial.
Applications:
1) Bezier curves are widely used in computer graphics to model
smooth curves
2) For 3D animation, bezier curves are often used to define 3D
paths as well as 2D curves.
Advantages:
Bezier curves are flexible and have a low degree.
Disadvantages:
 Control points: The shape of Bézier curves is defined by
their control points, and each point affects the entire curve.
 Conic curves: Bézier curves cannot accurately represent
conic curves and surfaces.
B-Spline Curve:
1)Concept of B-spline curve came to resolve the disadvantages
having by Bezier curve, as we all know that both curves are
parametric in nature.
2) In Bezier curve we face a problem, when we change any of the
control point respective location the whole curve shape gets
change.
3) But here in B-spline curve, the only a specific segment of the
curve-shape gets changes or affected by the changing of the
corresponding location of the control points.
SR 22

4)In the B-spline curve, the control points impart local control
over the curve-shape rather than the global control like Bezier-
curve.

B-spline curve shape before changing the position of control


point P1 –

B-spline curve shape after changing the position of control


point P1 –

You can see in the above figure that only the segment-1st shape as
we have only changed the control point P1, and the shape of
segment-2nd remains intact.
5) B-splines curves are independent of the number of control
points and made up of joining the several segments smoothly,
where each segment shape is decided by some specific control
points that come in that region of segment. Consider a curve given
below –
SR 22

Properties of B-spline Curve :


 Each basis function has 0 or +ve value for all parameters.

 Each basis function has one maximum value except for


k=1.
 The degree of B-spline curve polynomial does not depend
on the number of control points which makes it more
reliable to use than Bezier curve.
 B-spline curve provides the local control through control
points over each segment of the curve.
 The sum of basis functions for a given parameter is one.
Applications:
B-spline curves are used to model complex shapes and surfaces in
computer graphics and engineering.
Advantages:
The advantage over B-splines is that they are more flexible and
allow one to create a wider variety of curves.
The disadvantage of B-splines is the complexity in their definition.

b)Explain about Hermite curve. 10M


Hermite curve
1)A Hermite curve is a spline where every piece is a third degree
polynomial defined in Hermite form: that is, by its values and
initial derivatives at the end points of the equivalent domain
interval.
2)Cubic Hermite splines are normally used for interpolation of L4 C312.3
numeric values defined at certain dispute values x1 ,x2,x3, …..xn, to
achieve a smooth continuous function.
3)The data should have the preferred function value and derivative
at each Xk. The Hermite formula is used to every interval (Xk,
Xk+1) individually.
4)The resulting spline become continuous and will have first
derivative.
SR 22

5)If represents a parametric cubic point function for the curve


section between control points Pk and P, then boundary conditions
that define the Hermite curve section are

with DPk and DPk+1 specifying the value for parametric


derivatives(slope of the curve) at control points Pk and Pk+1.
The resulting Hermite curve is something like the below:

Fig.2.2. Hermite curve


6)The following vectors needs to compute a Hermite curve:

· P1: the start point of the Hermite curve

· T1: the tangent to the start point


SR 22

· P2: the endpoint of the Hermite curve

· T2: the tangent to the endpoint

7)These four vectors are basically multiplied with four Hermite


basis functions h1(s), h2(s), h3(s) and,h4(s) and added together.
h1(s) = 2s3 - 3s2 + 1
h2(s) = -2s3 + 3s2
h3(s) = s3 - 2s2 + s
h4(s) = s3 - s2

Figure 2.3 shows the functions of Hermite Curve of the 4 functions


(from left to right: h1, h2, h3, h4).

Fig.2.3. Functions of Hermite


curve

8)A closer view at functions ‘h1’and ‘h2’,the result shows that


function ‘h1’starts at one and goes slowly to zero and function
‘h2’starts at zero and goes slowly to one.
9)At the moment, multiply the start point with function ‘h1’and the
endpoint with function ‘h2’. Let s varies from zero to one to
interpolate between start and endpoint of Hermite Curve.
10)Function‘h3’and function ‘h4’are used to the tangents in the
similar way. They make confident that the Hermite curve bends in
the desired direction at the start and endpoint.
Application
The Hermite curve is used to interpolate sample points on a 2-D
plane that results in a smooth curve, but not a free form, unlike the
Bezier and B-spline curves. The most commonly used cubic spline
is a 3-D planar curve.
Advantages
Hermite curves are easily calculatable. They are used to smoothly
interpolate through control points. Understanding the mathematical
background of Hermite curves will help us to understand the entire
family of splines.
Disadvantages
SR 22

 First-order derivatives are required; it is not suitable for a


designer to provide first-order derivatives.
 There is no local control support.

c)Explain about polygon rendering methods. 10M


Definition:
Polygon rendering is the process of determining the color and
intensity of each pixel on the surface of a polygon in a 3D space to
create a 2D image. It involves applying various shading models,
such as constant intensity shading, Gouraud shading, and Phong
shading, to produce a realistic representation of a three-
dimensional object on a two-dimensional screen. The goal is to
simulate the appearance of real-world objects by accurately
representing the way they reflect light and cast shadows.
Polygon Rendering Methods
Different polygon rendering methods in computer graphics:
1. Constant Intensity Shading
2. Gouraud Shading
3. Phong Shading

L4 C312.3

Polygon Rendering methods


Constant Intensity Shading
It is a simple method of polygon rendering. It is also called Flat
shading. In this method every point has constant intensity. All
point of polygon has same intensity value. It is fast rendering
method. It is useful for displaying simple curved surface
appearances.
Gouraud Shading
It is developed by Gouraud. This rendering is done by intensity
interpolation. At each point the intensity value is calculated. It
interpolates linearly in the surface of the polygon. It eliminates
intensity discontinuity. It has match bands.
SR 22

Phong Shading
It is more accurate method of polygon rendering. At each point of
the surface, it interpolates the normal vector and applies the
illumination model. It is also called as normal vector interpolation
shading. It gives more real highlights of the surface. It reduces
match bands.

Q. No Question (s) Marks BL CO


SR 22

UNIT – IV
a)what is meant by translation in 3-D geometric
transformations.
A: Translation It is the movement of an object from one position to
another position. Translation is done using translation vectors.
1 There are three vectors in 3D instead of two. 1M L2 C312.4
These vectors are in x, y, and z directions.
Translation in the x-direction is represented using Tx. The
translation is y-direction is represented using Ty. The translation in
the z- direction is represented using Tz.
b)what is meant by Rotation in 3-D geometric transformations.
Rotation in 3-D refers to the process of rotating an object in
three-dimensional space around a specified axis. Here are some
key concepts related to 3-D rotation:
1. Axes of Rotation
1M L2 C312.4
 X-axis: Rotation around the horizontal axis.
 Y-axis: Rotation around the vertical axis.
 Z-axis: Rotation around the depth axis (out of the
plane).

c)what is meant by Reflection in 3-D geometric


transformations.
A:Reflection in 3-D refers to the flipping of a point, line, or
1M L2 C312.4
object across a specified plane in three-dimensional space. This
transformation produces a mirror image of the original object
relative to that plane.
d)what is meant by Scaling in 3-D geometric transformations.
Scaling in 3-D refers to the transformation that alters the size
of an object in three-dimensional space without changing its
1M L2 C312.4
shape. This transformation can make an object larger or
smaller by applying a scaling factor along each of the three
coordinate axes (X, Y, and Z).
e)what is meant by Shear transformations in 3-D geometric
transformations.
A: Shearing changes(or deformed) the shape of the object.
Shearing is the process of slanting an object in 3D space either
in x, y, or in the z-direction.
1M L2 C312.4
Given below are the types of shearing transformation.
 Shearing in X-direction.
 Shearing in y-direction
 Shearing in z-direction.

a)Write a short notes on viewing pipeline in 3-D viewing.


A:1)The viewing-pipeline in 3 dimensions is almost the same as
2 the 2D-viewing-pipeline. 3M L4 C312.4
2)Only after the definition of the viewing direction and
orientation (i.e., of the camera) an additional projection step
SR 22

is done, which is the reduction of 3D-data onto a projection


plane.

3)
b)Write a short notes on viewing coordinates. 3M

L4 C312.4

c)Write short notes on translation in 3-d geometrical 3M


transformations.
A: Translation It is the movement of an object from one position to
another position. Translation is done using translation vectors.
There are three vectors in 3D instead of two.
These vectors are in x, y, and z directions.
Translation in the x-direction is represented using Tx. The
translation is y-direction is represented using Ty. The translation in
the z- direction is represented using Tz.
If P is a point having co-ordinates in three directions (x, y, z) is L1 C312.4
translated, then after translation its coordinates will be (x1 y 1 z 1 )
after translation.
Tx Ty Tz are translation vectors in x, y, and z directions
respectively.
SR 22

d) Write short notes on scaling in 3-d geometrical 3M


transformations.
Scaling in 3-D refers to the transformation that alters the size of
an object in three-dimensional space without changing its shape. L1 C312.4
This transformation can make an object larger or smaller by
applying a scaling factor along each of the three coordinate axes
(X, Y, and Z).
SR 22

e) Write short notes on rotation in 3-d geometrical


transformations.
Rotation in 3-D refers to the process of rotating an object in
three-dimensional space around a specified axis. Here are some
key concepts related to 3-D rotation:
3M L1 C312.4
1. Axes of Rotation
 X-axis: Rotation around the horizontal axis.
 Y-axis: Rotation around the vertical axis.
 Z-axis: Rotation around the depth axis (out of the
plane).
SR 22

c)Write short notes on translation and scaling in 3-d geometrical


transformations.
A: Translation It is the movement of an object from one position to
another position. Translation is done using translation vectors.
There are three vectors in 3D instead of two.
These vectors are in x, y, and z directions.
Translation in the x-direction is represented using Tx. The
translation is y-direction is represented using Ty. The translation in
the z- direction is represented using Tz.
3 If P is a point having co-ordinates in three directions (x, y, z) is 5M L2 C312.4
translated, then after translation its coordinates will be (x1 y 1 z 1 )
after translation.
Tx Ty Tz are translation vectors in x, y, and z directions
respectively.
SR 22

Scaling:
Scaling in 3-D refers to the transformation that alters the size of
an object in three-dimensional space without changing its shape.
This transformation can make an object larger or smaller by
SR 22

applying a scaling factor along each of the three coordinate axes


(X, Y, and Z).
SR 22

b)Explain about 1)Rotation 2)Reflection in 3-D geometrical 5M


transformations.
A:Rotation:
Rotation in 3-D refers to the process of rotating an object in
three-dimensional space around a specified axis. Here are some
key concepts related to 3-D rotation:
1. Axes of Rotation
 X-axis: Rotation around the horizontal axis.
 Y-axis: Rotation around the vertical axis.
 Z-axis: Rotation around the depth axis (out of the
plane).

L2 C312.4
SR 22

Three kinds of Reflections are possible in 3D space:


 Reflection along the X-Y plane.
 Reflection along Y-Z plane.
 Reflection along X-Z plane.
1. Reflection along the X-Y plane: This is shown in the following
figure –

Reflection along x-y plane


The Reflection transformation matrix is used to perform the
reflection operation over the 3D image, which is as follows:

2. Reflection along the Y-Z plane: This is shown in the following


figure –
SR 22

Reflection along the Y-Z plane

The reflection transformation matrix for y-z axes is as


follows:

3. Reflection along the X-Z plane: This is shown in the


following figure –

Reflection along the X-Z plane:

The Reflection transformation matrix for z-x axes is as


follows:
SR 22

c)Explain about viewing pipeline in 3-D viewing. 5M

L3 C312.4

d)explain about viewing Coordinates in 3-D viewing. 5M L3 C312.4


SR 22

e)Explain view volume and general projection transforms in 3- 5M


D viewing.

L3 C312.4

When geometric objects are formed by the


intersection of lines with a plane, the plane is
called the projection plane and the lines are
called projections.
Types of Projections:
1. Parallel projections
2. Perspective projections
SR 22

Parallel Projection:
A parallel projection is formed by extending
parallel lines from each vertex of object until
they intersect plane of screen. Parallel
projection transforms object to the view plane
along parallel lines. A projection is said to be
parallel, if center of projection is at an infinite

distance from the projected plane.

It preserves relative propositions of objects,


and it is used in drafting to produce scale
drawings of 3D objects. This is not a realistic
representation, the point of intersection is the
projection of the vertex.
Parallel projection is divided into two parts:
1) Orthographic Projections
2) Oblique Projections
Perspective Projections:
SR 22

 A perspective projection is the one


produced by straight lines radiating from
a common point and passing through
point on the sphere to the plane of
projection.
Two characteristic of perspective are vanishing
point and perspective force shortening.

Different types of perspective projections:


 One point perspective projections: In this,
principal axis has a finite vanishing point.
Perspective projection is simple to draw.
 Two point perspective
projections: Exactly 2 principals have
vanishing points. Perspective projection
gives better impression of depth.
 Three point perspective projections: All
the three principal axes have finite
vanishing point. Perspective projection is
most difficult to draw.
SR 22

Perspective fore shortening:


The size of the perspective projection of the
object varies inversely with distance of the
object from the center of projection.

a)Explain 1)Translation 2) scaling 3)rotation 4)shear 10M


transformations 5)reflection in 3-D geometrical
transformations.
Translation It is the movement of an object from one position to
another position. Translation is done using translation vectors.
There are three vectors in 3D instead of two.
These vectors are in x, y, and z directions.
Translation in the x-direction is represented using Tx. The
translation is y-direction is represented using Ty. The translation in
4 the z- direction is represented using Tz. L2 C312.4
If P is a point having co-ordinates in three directions (x, y, z) is
translated, then after translation its coordinates will be (x1 y 1 z 1 )
after translation.
Tx Ty Tz are translation vectors in x, y, and z directions
respectively.
SR 22

Scaling:
Scaling in 3-D refers to the transformation that alters the size of
an object in three-dimensional space without changing its shape.
This transformation can make an object larger or smaller by
SR 22

applying a scaling factor along each of the three coordinate axes


(X, Y, and Z).

Rotation in 3-D refers to the process of rotating an object in


three-dimensional space around a specified axis. Here are some
key concepts related to 3-D rotation:
1. Axes of Rotation
 X-axis: Rotation around the horizontal axis.
 Y-axis: Rotation around the vertical axis.
 Z-axis: Rotation around the depth axis (out of the
plane).
SR 22

Reflection in 3-D refers to the flipping of a point, line, or object


across a specified plane in three-dimensional space. This
transformation produces a mirror image of the original object
relative to that plane.

Three kinds of Reflections are possible in 3D space:


 Reflection along the X-Y plane.
 Reflection along Y-Z plane.
 Reflection along X-Z plane.
1. Reflection along the X-Y plane: This is shown in the
following figure –

Reflection along x-y plane


SR 22

The Reflection transformation matrix is used to perform


the reflection operation over the 3D image, which is as
follows:

2. Reflection along the Y-Z plane: This is shown in the


following figure –

Reflection along the Y-Z plane

The reflection transformation matrix for y-z axes is as


follows:

3. Reflection along the X-Z plane: This is shown in the


following figure –

Reflection along the X-Z plane:


SR 22

The Reflection transformation matrix for z-x axes is as


follows:

b)Briefly explain about viewing pipeline in 3-D viewing. 10M L3 C312.4


SR 22

c)Briefly explain about viewing coordinates in 3-D viewing. 10M


The three-dimensional transformations are extensions
of two-dimensional transformation.
In 2D two coordinates are used, i.e., x and y whereas in
3D three co-ordinates x, y, and z are used.
For three dimensional images and objects, three-
dimensional transformations are needed. These are
translations, scaling, and rotation. These are also called
as basic transformations are represented using matrix.
More complex transformations are handled using
matrix in 3D.
The 2D can show two-dimensional objects. Like the Bar
chart, pie chart, graphs. But some more natural objects L3 C312.4
can be represented using 3D. Using 3D, we can see
different shapes of the object in different sections.
2) TRANSLATION:

 Translation is the movement of an object


from one position to anotherposition.
 Translation is done using translation
vectors.There are three vectors in 3D instead
of two. These vectors are in x, y, and z
directions.
SR 22

(i) Translation in the x-direction is represented


using Tx.
(ii) The translation is y-direction is represented
using Ty.
(iii) The translation in the z- direction is
represented using Tz.
 If P is a point having co-ordinates in three
directions (x, y, z) is translated, then after
translation its coordinates will be (x1 y 1 z 1
) after translation.
 Tx Ty Tz are translation vectors in x, y, and z
directions respectively.
SR 22
SR 22

s
SR 22

Q. No Question (s) Marks BL CO


UNIT – V
a)What is meant by classification?
Classification in visible surface detection (also known as hidden
surface removal) in computer graphics is the process of determining
1 which surfaces of 3D objects are visible from a particular viewpoint 1M L4 C312.5
and which are hidden from view by other surfaces. This is crucial for
rendering realistic images, as it ensures that only the surfaces that
should be seen are displayed, while hidden surfaces arenot drawn.
b)What is the dominant frequency?
: The term dominant frequency refers to the most prominent
frequency component in a signal or image, which can be
related to the patterns of colors or intensity values in the 1M L1 C312.5
image. This concept is often analyzed in the context of color
models and frequency domain representations, particularly in
techniques such as Fourier Transform.

c)What is the complementary color?


Two color sources combine to produce white light, they are
referred to as complementary colors. Examples of 1M L1 C312.5
complementary color pairs are red and cyan, green and
magenta, and blue and yellow.

d)What is meant by primary colors?


In computer graphics, primary colors are the fundamental
colors that can be combined to create a wide spectrum of
other colors. Different color models utilize different sets of 1M L1 C312.5
primary colors based on the way colors are mixed, whether
through additive or subtractive processes.

e)What is XYZ color model?


 The XYZ color model, developed by the CIE
(International Commission on Illumination),
is a color representation based on three values
1M L1 C312.5
(X, Y, andZ) that correspond to human visual
perception of color. It serves as a device-
independent color model and is often used as
a reference for other color spaces, like RGB
SR 22

and CMYK.
 The set of primaries is generally referred to as
the XYZ or (X, Y, Z) color model where X, Y
and Z represent vectors in a 3D, additive color
space.

a)Write a short notes on back-face detection


1) Back-Face detection is also known as the name
Plane Equation method, and it is a method for the
object space methods in which objects or basically
the parts of the given objects are compared with each
other to find if a 3-D object will be cast on the 2-D
surface then what surfaces are the visible.
2) 2) Recalling the polygon surface equation : Ax +
By + Cz + D < 0 .While determining whether a
surface is back-face or front face, also consider the
viewing direction.
 The normal of the surface is given by : N = (A, B,
C)
2 3M L4 C312.5
 A polygon is a back face if Vview.N > 0. But it
should be kept in mind thatafter application of
the viewing transformation, viewer is looking
down the negative Z-axis. Therefore, a
polygon is back face ,
if :
(0, 0, -1).N > 0
or if C < 0

 Viewer will also be unable to see surface with


C = 0, therefore, identifyinga polygon surface
as a back face,
if : C <= 0.
SR 22

b)write a short notes on depth-buffer. 3M

1) It is also known as z-buffer method.This method is


developed by Cutmull. It isan image-space approach.
The basic idea is to test the Z depth of each surface
to determine the closest visible surface.
2) To override the closer polygons from the far ones,
two buffers named frame buffer and depth buffer, are
used. L4 C312.5
3) Depth buffer is used to store depth values for x,y
position, as surfaces are processed 0≤depth≤1.
4) The frame buffer is used to store the intensity
value of color value at each position x,y.
5) It is efficient and widely used in real-time
applications like video games and simulations.

c)write a short notes on XYZ color model 3M


1) The set of primaries is generally referred to as the
XYZ or (X, Y, Z) color modelwhere X, Y and Z
represent vectors in a 3D, additive color space.
2) Any color Cλ is expressed as Cλ = XX + YY
+Z Z .Where X, Y and Zdesignates the amounts
of the standard primaries needed to match Cλ. L4 C312.5

3) It is convenient to normalize the amount in


equation against luminance (X +Y+ Z).
4) Normalized amounts are calculated as,
x = X / (X+Y+Z), y = Y / (X+Y+Z), z = Z / (X+Y+Z) with x
+y+z=1.
SR 22

d)Write a short notes on YIQ color model 3M


The YIQ color model is a color space used in television
broadcasting, particularly for NTSC (National Television
System Committee) systems. It represents color using three
components: Y, I, and Q.
1. Y (Luminance): This component represents the
brightness of the color and is derived from a weighted
combination of the RGB values. It is designed to match
the sensitivity of the human eye, which is more sensitive
to brightness changes than to color changes. This allows
the YIQ model to support black-and-white television
compatibility, as older sets can use only the Y
component. L4 C312.5
2. I (In-phase) and Q (Quadrature): These components
represent the chrominance, or color information.
The I component contains information for colors along
an orange-blue axis, while the Q component represents
colors along a green-purple axis.
The YIQ model is particularly significant because it compresses
color data, allowing for reduced bandwidth while preserving
important visual information, particularly for grayscale
displays. This model was primarily used for analog color TV
transmission in the United States before the transition to digital
broadcasting.

e)Write a short notes on CMY color model


1)The CMY color model is a subtractive color model used in
computer graphics, particularly in color printing. It represents
colors through three primary components: Cyan (C), Magenta
(M), and Yellow (Y).
2)Subtractive Color Mixing: In the CMY model, colors are
created by subtracting light using inks or dyes on white paper. 3M L4 C312.5
Each color component absorbs (subtracts) certain wavelengths
of light. For example, cyan ink absorbs red light, magenta
absorbs green, and yellow absorbs blue.
3) When combining these colors, overlapping inks subtract
more light, creating secondary colors and darker shades.

a)Explain back-face detection method


1)Back-Face detection is also known as the name Plane Equation
method, and it is a method for the object space methods in which
objects or basically the parts of the given objects are compared
3 5M L2 C312.5
with each other to find if a 3-D object will be cast on the 2-D
surface then what surfaces are the visible.
2)Let us consider a triangular surface that whose visibility needs to
decided. The idea is to check if the triangle will be facing away
SR 22

from the viewer or not. If it does so, discard it for the current frame
and move onto the next one. Each surface has a normal vector.
3) If this normal vector is pointing in the direction of the center of
projection, then it is a front face and can be seen by the viewer.
4) If this normal vector is pointing away from the center of
projection, then it is a back face and can not be seen by the viewer.
5)Recalling the polygon surface equation :
Ax + By + Cz + D < 0
While determining whether a surface is back-face or front face,
also consider the viewing direction. The normal of the surface is
given by :
N = (A, B, C)
A polygon is a back face if V view.N > 0. But it should be kept in
mind that after application of the viewing transformation, viewer is
looking down the negative Z-axis. Therefore, a polygon is back
face if :
(0, 0, -1).N > 0
or if C < 0
Viewer will also be unable to see surface with C = 0, therefore,
identifying a polygon surface as a back face if : C <= 0.

6)Algorithm for left-handed system :


1) Compute N for every face of object.
2) If (C.(Z component) > 0)
then a back face and don't draw
else
front face and draw
Back-face detection method is very simple. For the left-handed
system, if the Z component of the normal vector is positive, then it
is a back face. If the Z component of the vector is negative, then it
is a front face.
7) Algorithm for right-handed system :
1) Compute N for every face of object.
2) If (C.(Z component) < 0)
then a back face and don't draw
else
front face and draw
Thus, for the right-handed system, if the Z component of the
normal vector is negative, then it is a back face. If the Z
component of the vector is positive, then it is a front face.
SR 22

b)Explain depth-buffer method 5M


1)It is also known as z-buffer method.
This method is developed by Cutmull. It is an image-space
approach. The basic idea is to test the Z-depth of each surface to
determine the closest visible surface.
2)In this method each surface is processed separately one pixel
position at a time across the surface. The depth values for a pixel
are compared and the closest smallest surface determines the color
to be displayed in the frame buffer.
3)It is applied very efficiently on surfaces of polygon. Surfaces can
L2 C312.5
be processed in any order. To override the closer polygons from
the far ones, two buffers named frame buffer and depth
buffer, are used.
4)Depth buffer is used to store depth values for x,y position, as
surfaces are processed 0≤depth≤1.
5)The frame buffer is used to store the intensity value of color
value at each position x,y.
6)The z-coordinates are usually normalized to the range [0, 1]. The
0 value for z-coordinate indicates back clipping pane and 1 value
for z-coordinates indicates front clipping pane.
SR 22

7)Algorithm
Step-1 − Set the buffer values −
Depthbuffer x,y = 0
Framebuffer x,y = background color
Step-2 − Process each polygon Oneatatime
For each projected x,y pixel position of a polygon, calculate depth
z.
If Z > depthbuffer x,y
Compute surface color,
set depthbuffer x,y = z,
framebuffer x,y = surfacecolor x,y
8)Advantages
 It is easy to implement.

 It reduces the speed problem if implemented in hardware.


 It processes one object at a time.
Disadvantages
 It requires large memory.

 It is time consuming process.

c)Explain BSP-tree methods 5M


1)Binary Space Partitioning is implemented
for recursively subdividing a space into two convex sets by using
hyperplanes as partitions. L2 C312.5
2)This process of subdividing gives rise to the representation of
objects within the space in the form of tree data structure known as
BSP Tree.
SR 22

3)Binary space partitioning arose in the context of 3D computer


graphics in 1969.
4)Where the structure of a BSP tree allows for spatial information
about the objects in a scene that is useful in rendering, such as
objects being ordered from front-to-back with respect to a viewer
at a given location, to be accessed rapidly.
5)

6) Binary space partitioning arose from the computer


graphics need to rapidly draw three-dimensional scenes
composed of polygons.
7)Let us consider example,
SR 22

d)Explain RGB color model 5M


RGB COLOR MODEL:
1)The RGB color model is one of the most widely used color
representation method in computer graphics. It use a color
coordinate system with three primary colors:
R(red), G(green), B(blue) L2 C312.5
2)Each primary color can take an intensity value ranging from
0(lowest) to 1(highest). Mixing these three primary colors at
different intensity levels produces a variety of colors.
3)The collection of all the colors obtained by such a linear
combination of red, green and blue forms the cube shaped RGB
color space.
SR 22

4)The corner of RGB color cube that is at the origin of the


coordinate system corresponds to black, whereas the corner of the
cube that is diagonally opposite to the origin represents white.
5)The diagonal line connecting black and white corresponds to all
the gray colors between black and white, which is also known
as gray axis.
6)In the RGB color model, an arbitrary color within the cubic color
space can be specified by its color coordinates: (r, g.b).
7)As with the XYZ color system, the RGB color scheme is an
additive model.

e)Explain XYZ color model. 5M


1)The set of primaries is generally referred to as the XYZ or (X, Y,
Z) color model where X, Y and Z represent vectors in a 3D,
additive color space.
2)Any color Cλ is expressed as Cλ = XX + YY +Z Z
L2 C312.5
Where X, Y and Z designates the amounts of the standard
primaries needed to match Cλ.
3)It is convenient to normalize the amount in equation against
luminance (X + Y+ Z).
4)Normalized amounts are calculated as,
SR 22

x = X / (X+Y+Z), y = Y / (X+Y+Z), z = Z / (X+Y+Z) with x + y +


z=1.
Any color can be represented with just the x and y amounts. The
parameters x and y are called the chromaticity values because they
depend only on hue and purity.

 Advantages:
 Standardized color space: The XYZ color model
is a standardized color space, which can be sensed
by a color sensor.
 Basis for other color spaces: The XYZ color
model was one of the first color spaces based on
human color perception, and it's the basis for many
other color spaces.
 Disadvantages :
 Color transformations: Color transformations
between color spaces can be imperfect, especially if
the target color space doesn't cover all the colors in
the source space.
 Limited resolution: Color coordinates are often
stored with limited resolution, which can lead to
rounding errors during transformations.

a)Explain 1)XYZ color model.2)YIQ color model 10M


XYZ COLOR MODEL :
1)The set of primaries is generally referred to as the XYZ or (X, Y,
Z) color model where X, Y and Z represent vectors in a 3D,
additive color space.
2)Any color Cλ is expressed as Cλ = XX + YY +Z Z
4 Where X, Y and Z designates the amounts of the standard L2 C312.5
primaries needed to match Cλ.
3)It is convenient to normalize the amount in equation against
luminance (X + Y+ Z).
4)Normalized amounts are calculated as,
x = X / (X+Y+Z), y = Y / (X+Y+Z), z = Z / (X+Y+Z) with x + y +
z=1.
SR 22

Any color can be represented with just the x and y amounts. The
parameters x and y are called the chromaticity values because they
depend only on hue and purity.

 Advantages:
 Standardized color space: The XYZ color model
is a standardized color space, which can be sensed
by a color sensor.
 Basis for other color spaces: The XYZ color
model was one of the first color spaces based on
human color perception, and it's the basis for many
other color spaces.
 Disadvantages :
 Color transformations: Color transformations
between color spaces can be imperfect, especially if
the target color space doesn't cover all the colors in
the source space.
 Limited resolution: Color coordinates are often
stored with limited resolution, which can lead to
rounding errors during transformations.
SR 22

• An NTSC video signal can be converted to an RGB signal


using an NTSC decoder
From YIQ to RGB

Note: that the top row is identical to that of the YUV color space

 NTSC: The NTSC standard was the first American


standard for analog television, published in 1941. It was
designed to add color to the original black and white
television standard while still allowing black and white
TVs to work.
Advantages:
 The advantage of this model is that more width can be
assigned to the Y-component (Luminance) because the
human visual system is more sensitive to changes in
luminance than to changes in hue or saturation.
 For display on a screen, color television sets map these
channels Y, I, and Q to R, G, and B.
Disadvantage:
 Due to the high implementation costs for true I and Q
decoding, few television sets do it.
SR 22

 To accommodate the bandwidth variances between I and Q,


each of I and Q needs a distinct filter.

b)Explain 1)RGB color model 2) CMY color model 10M


RGB COLOR MODEL:
1)The RGB color model is one of the most widely used color
representation method in computer graphics. It use a color
coordinate system with three primary colors:
R(red), G(green), B(blue)
2)Each primary color can take an intensity value ranging from
0(lowest) to 1(highest). Mixing these three primary colors at
different intensity levels produces a variety of colors.
3)The collection of all the colors obtained by such a linear
combination of red, green and blue forms the cube shaped RGB
color space.

L2 C312.5

4)The corner of RGB color cube that is at the origin of the


coordinate system corresponds to black, whereas the corner of the
cube that is diagonally opposite to the origin represents white.
5)The diagonal line connecting black and white corresponds to all
the gray colors between black and white, which is also known
as gray axis.
6)In the RGB color model, an arbitrary color within the cubic color
space can be specified by its color coordinates: (r, g.b).
SR 22

7)As with the XYZ color system, the RGB color scheme is an
additive model.
Intensities of the primary colors are added to produce other colors.
Each color point within the bounds of the cube can be represented
as the triple (R, G, B), where values for R, G, and B are assigned in
the range from 0 to 1.

8)The magenta vertex is obtained by adding red and blue to


produce the triple (1, 0, l) and white at (1, l, 1) is the sum of the
red, green and blue vertices.
9)Shades of gray are represented along the main diagonal of the
cube from the origin (black) to the white vertex.
 Advantages

 Wider color gamut: RGB has a wider range of


colors than other color models, like CMYK, which
allows for more vibrant colors.
 Simplicity and compatibility: RGB is simple and
compatible.
 Disadvantages
 Limited perceptual uniformity: RGB doesn't have
perfect perceptual uniformity.
 Can't represent all colors: RGB can't represent all
colors as efficiently as other models.

CMY COLOR MODEL:


SR 22

 A black dot is included because the combination of cyan,


magenta, and yellow inks produce gray instead of black.
Advantage:
 Color accuracy

CMYK can accurately reproduce a wide range of colors on


paper. This is because CMYK uses a subtractive color model,
which blends different percentages of the primary colors cyan,
magenta, yellow, and key (black).
Disadvantage:
One of the main disadvantages of using CMYK for print is that it
has a smaller color gamut than RGB, which means that it cannot
reproduce some of the colors that RGB can. This can make your
images look duller, darker, or less saturated than they appear on
your screen.

c)Explain BSP tree methods and area sub-division methods. 10M L2 C312.5
SR 22

1)Binary Space Partitioning is implemented


for recursively subdividing a space into two convex sets by using
hyperplanes as partitions.
2)This process of subdividing gives rise to the representation of
objects within the space in the form of tree data structure known as
BSP Tree.
3)Binary space partitioning arose in the context of 3D computer
graphics in 1969.
4)Where the structure of a BSP tree allows for spatial information
about the objects in a scene that is useful in rendering, such as
objects being ordered from front-to-back with respect to a viewer
at a given location, to be accessed rapidly.
5)

6) Binary space partitioning arose from the computer


graphics need to rapidly draw three-dimensional scenes
composed of polygons.
7)Let us consider example,
SR 22

6)Algorithm of generating a BSP Tree from a list of polygons


 Select a polygon P from the list.

 Make a node N in the BSP tree, and add P to the list of


polygons at that node.
 For each other polygon in the list:
o If that polygon is wholly in front of the plane
containing P, move that polygon to the list of nodes
in front of P.
o If that polygon is wholly behind the plane
containing P, move that polygon to the list of nodes
behind P.
o If that polygon is intersected by the plane
containing P, split it into two polygons and move
them to the respective lists of polygons behind and
in front of P.
o If that polygon lies in the plane containing P, add it
to the list of polygons at node N.
 Apply this algorithm to the list of polygons in front of P.
 Apply this algorithm to the list of polygons behind P.
SR 22

Disadvantage of BSP
 Generating a BSP tree can be time-consuming.

 BSP does not solve the problem of visible surface


determination.
Uses of BSP
 It is used in collision detection in 3D video games and
robotics.
 It is used in ray tracing
 It is involved in the handling of complex spatial scenes.
Area Subdivision Methods:
1)It was invented by John Warnock and also called a Warnock
Algorithm. It is based on a divide & conquer method.
2)It uses fundamental of area coherence. It is used to resolve the
visibility of algorithms.
3)It classifies polygons in two cases i.e. trivial and non-trivial.
Trivial cases are easily handled. Non trivial cases are divided into
four equal subwindows. The windows are again further subdivided
using recursion until all polygons classified trivial and non trivial.
SR 22

Classification of Scheme
It divides or classifies polygons in four categories:
1. Inside surface
2. Outside surface
3. Overlapping surface
4. Surrounding surface
1. Inside surface: It is surface which is completely inside the
surrounding window panel or specified boundary as shown
in below figure.
SR 22

2. Outside surface: The polygon surface completely outside


the surrounding window panel as shown in below figure

3. Overlapping surface: It’s the case in which the window


panel(viewport) and viewing polygon surface both
intersect each other as shown in below figure.

4. Surrounding surface: It’s the case in which the viewing


polygon surface completely surrounds the whole window panel.

You might also like