0% found this document useful (0 votes)
105 views22 pages

Overview of Computer Graphics and Its Applications

The document discusses computer graphics and provides definitions and explanations of key terms related to computer graphics. It covers topics like raster and vector graphics, color models, image processing, visualization and more. It also lists advantages of computer graphics and operations performed in computer graphics.

Uploaded by

nirojmarki15
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)
105 views22 pages

Overview of Computer Graphics and Its Applications

The document discusses computer graphics and provides definitions and explanations of key terms related to computer graphics. It covers topics like raster and vector graphics, color models, image processing, visualization and more. It also lists advantages of computer graphics and operations performed in computer graphics.

Uploaded by

nirojmarki15
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

1.What is computer graphics? List its advantages.

Computer graphics (CG) is the “the discipline of producing pictures or images using a computer
including modeling – creation, manipulation and storage of geometric objects and rendering,
converting a scene to an image, or the process of transformation, rasterization, shading,
illumination and animation of the image”.

Advantages

• Information becomes more communicative when it represented graphically.


• Mathematical models of hyperspace objects can be easily realized using computers.
• Visual form of data may be more relevant to realize their characteristics.
• A huge table of number may be replaced by a simple graph or chart diagram.
• Creation of engineering designs and architectural blue print can be fully automated.
2.What are the operation performed by computer graphics?
Computer graphics deals with creation, manipulation, representation and production of graphical
objects on output devices either in animated or in non-animated forms.
The basic operation of computer graphics thus can be listed as follows:

• Creation of elementary objects.


• Creating basic shapes. Creating solid objects.
• Sizing and positioning.
• Projection of 2D.
• Shading of coloring.
• Viewing and clipping.
• Hidden surface elimination.
• Producing animated views.
3.Enlist various graphical standards.
A good computer graphics system includes good software, as well as a compatible hardware. Both
computer graphics vendors as well as users identified some needs to have some graphics standards.
The needs for graphics standards are as follows:

• Software portability.
• Image data portability.
• Text data portability. * Model database portability.
4.Define the following terms:
Pixel- A pixel is the smallest unit of a digital image or graphic that can be displayed and
represented on a digital display device.
A pixel is the basic logical unit in digital graphics. Pixels are combined to form a complete image,
video, text, or any visible thing on a computer display.

color-colour, also spelled color, the aspect of any object that may be described in terms of hue,
lightness, and saturation.
Color depth- Color depth or colour depth (see spelling differences), also known as bit depth, is
either the number of bits used to indicate the color of a single pixel, or the number of bits used for
each color component of a single pixel.
Resolution-Resolution indicates the number of pixels that are displayed per inch for an image (or
pixels per centimeter). Most computer monitors display at resolutions of 72 pixels per inch or 96
pixels per inch.

5.What is meant by raster(pixel) and vector graphics?


In computer graphics, there are two popular ways to generate images namely, Pixel Graphics and
Vector Graphics.

Raster graphics-Raster is a rectangular array of points or dots. Each row of pixels is called a raster
line or scan line .

Vector graphics-With vector graphics, the liners are stored as equation inside the computer.
They are expressed in vector format so they have a starting point, a length and a direction.

6.What is picture? How to represent it?

Picture in computer graphics, ultimately consists of point and a drawing algorithm to display them.
This transformation is generally stored in a file before it is used to present the picture.

The term “image” refers to a real-world picture usually taken by a camera and later on digitized for
computer usage, a “graphic” denotes something that is hand-dawn. When represent digitally a
graphic can be broadly categorized into two types Raster graphic and Vector graphic.

7. Write a short note on- Preparing Pictures of Presentation?

Pictures in computer graphics, ultimately consist of points and a drawing algorithm to display
them. This transformation is generally stored in a file before it is used to present the picture; this
file is called a database.

8.What is visualization? Define it.

The International Standards Organisation (ISO) can be said, that the main task of computer
graphics is converting data into images. The process of converting data into images is known as
visualization.
9.Write a short note Image Processing.

Image processing analyze picture to derive descriptions (often in mathematical or geometrical


forms) of objects appeared in the pictures.

Image processing refers to the manipulation of digital images in order to extract more information
than is actually visible on the original image.

10.Explain the term windowing and viewport in details.

10.Explain RGB color model in detail.

The RGB color model specifies the Red, Green and Blue components of color. The most common
of these is the RGB color model. The main purpose of the RGB color model is for the sensing,
representation, and display of images in electronic systems, such as television and computers,
though it has also been used in conventional photography.

The RGB model states, that each color image is actually formed of there different images. Red
image, Blue image and Black image. A normal grayscale images can be defined by only one
matrix, but a color image is actually composed of there different matrices.

11.Describe direct coding in detail.

The representation of image is fundamentally the representation of the pixel colors. Direct coding
helps to allocate a specific amount of storage space for each pixel, in order to code its color. In
most of the application, the total number of colors that appear in any one particular image is much
less. Therefore, the ability of 24-bit representation to have 16.7 million different colors appear all
together in a single images to be overloaded.

12.What is meant by lookup table?

In computer graphics, an important mechanisms is used for converting a variety of colors into
another variety of color. This mechanisms is referred to as a Lookup table (LUT), also called as a
color Look Up Table (CLUT).

13.Explain the terms: raster scan and vector scan.

Raster scan- In raster scan display the beam is moved all over the screen one scan at a time. From
top to bottom and back to top.

In raster display, the refresh process is independent of the complexity of the image.

Vector scan- In vector scan display the beam is moved between the end points of the graphics
primitives.

Vector display flickers when the number of primitives in the buffer becomes too large.

14.What are the meant by graphics software?


In computer graphics, graphics software refers to a program or collection of programs that enable a
person to manipulate images or models visually on a computer. Computer graphics can be
classified into distinct categories namely, raster graphics and vector graphics, with further 2d and
3d variants.

15.Define the term:

1.Point-The point itself is just the location and it has no size. A line is a set of points. It is
theoretically made up of an infinite number of points because it is a finite length divided by zero –
the theoretical length of the time.

2.Transformation-Transformation play an important role in computer graphics to reposition the


graphics on the screen and change their size or orientation

16.Compare raster and vector graphics.


RASTER GRAPHICS | VECTOR GRAPHICS

Raster graphics are composed of pixels. | Vector graphics are composed of paths.

Raster graphics are resolution dependent. |Vector graphics are resolution independent.

More expensive |Less expensive.

Raster graphics, becomes “blocky,” |Because vector graphics are not made of pixels since
each pixel increase in size as |the image can be scaled to be very large the image is made
larger. |without losing quality.

A raster is usually difficult to modify |Easy to modify without loss of information. (editing)
without loss of information.
17.What is visualization define it.

Most data visualization today relies on computer graphics to present data in innovative ways, so
that obscured abstract or complex information becomes obvious and easy to comprehend through
image and/or animations. Visualization is any technique for creating images, diagrams, or
animations to communicate a message.

18.Write a short note on: image processing.

Image processing analyze picture to device description (often in mathematical or geometrical


forms) of objects appeared in the pictures. Image processing refers to the manipulation of digital
images in order to extract move information than is actually visible on the original image. Image
processing is applied in many fields, such as, medical imaging, remote sensing, forensic studies,
textiles, film industry, documents processing, graphics arts, printing industry, and so on.
DVST :- Storage refers to the specific manner in which the data is stored. DVST is CRT with some
modifications i.e., storage capability. Whatever, picture or image displayed is stored on the tube.
DVST is very similar to CRT but has extremely long persistence phosphor, as image on the screen
will remain visible for up to an hour.

20.Enlist various 3d viewing devices.

The use of three-dimensional (3d) effects has experienced a resurgence. Many advertising labels
use 3d stickers and are increasingly seen in 3d audio and visual displays.

In addition, a great number of medical and technological application can be found in a variety of
industries, including magnetic resonance imaging, computerized Axial Imaging (CAT scan)
imaging architectural plan development and flight simulation.

21.Enlist application of computer graphics.

Computer Entertainment (film, videos games, advertising etc.)

CAD/CADD (architecture, mechanical design, electrical design…)

Computer art

Education and training internet

Multimedia graphical user interface (GUI)

Presentation graphics simulation (flight, driving and virtual reality)

Scientific and engineering graphics


1.What is scan conversion?
A picture is completely specified by the set of intensities for the pixel position in the display. Shapes and
colors of the objects can be described internally with pixel array into the frame buffer or with the set of
the basic geometric-structure such as straight line segments and polygon color areas.

2.What is point and line?

POINT A Point in three-dimensional geometry is defined as a location in 3D space that is uniquely defined by an
ordered triplet (x, y, z) where x, y, & z are the distances of the point from the X-axis, Y-axis, and Z-axis
respectively.
LINE :- A line, or line segment, can be uniquely described by two points, according to geometry. We
also know from algebra that a line can be defined by a slope, commonly denoted by the letter m, and a
yaxis intercept, denoted by the letter b.
3.Explain scan converting a point in detail. As pixel is one dot or picture element of the raster, it
does not represent any mathematical point. A mathematical point (x,y).Where x and y are real numbers
within an images area, needs to be scan converted to a pixel at location (x’,y’).This could be done any
making x’ to be integer part of x’ and y’ the integer part of y.
4.Describe co-ordinate system in details.
Concept of Co-ordinate Systems:
On the monitor screen, let origin actually be at the top left-hand corner; x co-ordinate increases from
left-to-right and y co-ordinate increases in downward direction. Such a system is left-handed co-
ordinate system The origin at lower left-hand corner where x co-ordinate increases from left-to-right
and y co-ordinate increases in upward direction. Such a system is called right-handed co-ordinate
system
5.Explain Bresenham’s line drawing algorithm.
The Bresenham’s algorithm was developed by jack E. Bresenham in 1962 at IBM. Bresenham’s line
algorithm is an efficient incremental method for scan converting the lines. It works on the principle of
finding raster location to represent the straight lines.
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

6.What is polygon? Enlist its types.


A polygon is a closed plane made up of several line segments that are joined together. The sides do not
cross each other. Exactly two sides meet at every vertex.
There are two types of polygons
1.Convex polygon- A polygon in which the line segment joining any two points within polygon lies
completely inside the polygon is called convex polygon.
2. Concave polygon-A polygon in which the line segment joining any two points within polygon lies
completely inside the polygon is called convex polygon.

7.Describe Bresenham’s circle generation algorithm.


We cannot display a continuous arc on the raster display. Instead, we have to choose the nearest pixel
position to complete the arc. A letter algorithm for generating a circle has been developed by
Bresenham.
Algorithm
Step1: Get the co-ordinates of the center of the circle and radius, and store them in x, y, and R
respectively. SetP=0 and Q = R.
Step2: Set decision parameter D = 3-2R.
Step3: Repeat through step-8 while x<y.
Step4: Call Draw Circle (X, Y, P, Q), Step5:
Increment the value of P.
Step6: If D<o then D=D+4x+6
Step7: Else Set Y=Y+1,D=D+4(x-y)+10.
Step8: call draw circle (X,Y,P,Q)

8. What is meant by polygon filling?


Filling a polygon means finding co-ordinates of interior points and assigning values calculated by using
one of the incremental shading schemes. This requires the construction of an edge list for each polygon.
Filling any polygons means highlighting all the pixels which lie inside the polygon with any colour other
than background colour.
9.Define the following terms:
Point- The smallest elements which can be shown on a graphic is a point.
1.What is meant by transformation?
The term ‘transform’ means to ‘change’. Transformation means changing some graphics into something
else by applying rules.
Transformations play an important role in computer graphics to reposition the graphics on the screen
and change their size or orientation.
2.List out different geometric transformation.
3.What is translation?
Translation can be defined as “the process of repositioning an object along a straight line path from one
co-ordinate location to new co-ordinate location.”
A translation is applied to an object by repositioning it along a straight-line path from one coordinate
location to another.
4.WHAT is Rotation?
Rotation as the name suggests is to rotate a point about an axis. The axis can be any of the co-ordinate
or simply any other specified line also.
5.What is scaling?
Scaling means to change the size of objects. This change can either be positive or negative. To change
the size of an object, scaling transformation is used. In the scaling process, you either expand or
compress the dimensions of the object.
6.Define Homogenous co-ordinates?
Homogeneous coordinate systems mean expressing each coordinate as a homogeneous coordinate
to represent all geometric transformation equations as matrix multiplication. The transformed matrix
can be expressed in general matrix form.
7.What is x-shear and y-shear
x-shear
The x-shear preserves the Y co-ordinates and change are made to X co-ordinates, which cause the
vertical lines to tilt right or left
y-shear
The y-shear preserves the X co-ordinates and change the Y co-ordinates which causes horizontal lines
to transform into lines which slopes up or down.
8.Write a short note on – Transformation of line
Line is given by two points, p1(starting point) and p2 (ending point) where p1(x1,y1) and p2(x2,y2).
Line transformation deals with its rotation. The rotation may be clockwise or anticlockwise. If
anticlockwise angle of rotation is O then rotate all points to around P1 andP2 by 0.
9.Explain window viewport co-ordinate system?
To perform a viewing transformation, we deal with a finite region in the WCS (world co-ordinate system)
called a window. The window can be mapped directly on the display area of the device or on to a
subregion of the display called a viewport.
Window frame outlines and defines the portion of the object. While viewport is the zone of the m onitor
screen within which we wish to view the selected object.
10.What is Reflection?
The term ‘reflection’ means to simply reflect an object in the plane mirror. The image is made on the
opposite side. In short, reflection is the mirror image of original object. In other words, we can say that
it is a rotation operation with 1800
11.What is clipping? Give application of clipping.
Clipping is a procedure for spatially partitioning geometric primitives, according to their containment
within some region. The region against which an object is to clip is called a clip window. It is usually
rectangular window.
Application of clipping
• Extracting part of a defined scene for viewing.
• Identifying visible surface in three-dimensiona1 clews.
• Antialiasing line segments or object boundaries.
• Creating objects using solid-modeling procedure, and
• Displaying a multi-window environment.
12.What are the constraints for point clipping?
If any one of these four inequalities is not satisfied, the point is clipped (not saved for display). Although
point clipping is applied less often than lines or polygon clipping, some application may require a point
clipping procedure.
For example, point clipping can be applied to scenes involving explosion or sea foam that is modelled
with particles (points) distributed in some region of the scene.
13.Explain Cohen-Sutherland Line clipping algorithm.
This is one of the oldest and most popular line clipping procedure. To speed up the processing of line
segments, this algorithm performs initial tests that reduce the number of inter-section that must be
calculated. It is four-digit binary code, called a region code or outcode that identifies the location of the
point relative to the boundaries of the c lipping rectangle.
14.What is meant by circle clipping?
The circle clipped circle is the set of arcs down between alternate pairs of critical points. Circles have
symmetries between quadrants and octants, so we could check the coordinate extends of these
individual circle region.
15.What is meant by ellipse clipping?
The graphical concept of clipping is related to that of a clipping window. In general, a graphics window
can be defined as, “a rectangular area that delimits the computer screen also called the viewport”.
Clipping graphical object is excluding the part of this object that lie outside clipping window.
1.What is transformation? Define it?
The field of computer graphics concerned with generating and displaying three-dimensional objects in a
two-dimensional space (e.g., the display screen). Image point produces a three-dimensional coordinate
plane. The coordinates that define each image point in 3d space are a triplet of x, y and z values.
2.Explain 3D basic transformation an object.

2.What is projection? What are the types of projection?


After converting the description of objects from world coordinates to viewing coordinates, we can
project the three dimensional objects onto the two dimensional view plane.
Types of projection are
1.Parallel projection
2.perspective projection
3.Write a short note on
Parallel projection- In parallel projection, coordinate position are transformed to view plane alone parallel
lines. A parallel projection preserves relative proportion of objects. Accurate views of the various side of
an object are obtained with a parallel projection.
Perspective projection- The perspective projection, on the other hand, produces realistics views but does
not preserve relative proportions. In perspective projection, the lines of projection are not parallel.
Instead, they all converge at a single point called the center of projection or projection reference point.
4.Differentiate between parallel and perspective projection.
Parallel projection perspective projection
In parallel projection, the center of projection In perspective projection, the center of projection,
Is at infinity. Is at a finite distance.
Here, all projects are parallel to each other. Here, projection are not parallel.
It is less realistic view. It is more realistic.
It can be used for the application where exact It resemble to that of our photographic system
Measurement is required. (camera) and human eye.
These are linear transform implemented with a These are non-linear transforms.
Matrix.
Examples: use of drawing schematic diagrams Examples: use in architectural rendering realistic
Views.
5.Explain various types of parallel projection.
Types of parallel projection
1. Orthographic parallel projection- orthographic parallel projection are done by projecting points
along parallel lines that are perpendicular to the projection plane.
2. Oblique parallel projection- oblique parallel projection are obtained by projecting along parallel
lines that are NOT perpendicular to the projection plane.
6.Explain various type of perspective projection.
Types of perspective projection
1. One-point perspective projection- it occurs when projection plane is parallel to two principle axes
or when only one of the principle axes intersects the view plane
2. Two-point perspective projection-it occurs when projection plane is parallel to one of principal
axis or when plane of projection intersects exactly two of the principal axis
3. Three-point perspective projection-it occurs when projection plane is not parallel to any principal
axis or when plane of projection intersects all of the three principal axes
7.Write a short note on view volume
In the camera analogy, the type of lens used on the camera is one factor that determines how much of
the scene is caught on film. View volume is formed by giving the specification of the view window or the
window boundaries. Only those objects within the view volume appear in the generated display on an
output device
8.What is viewport clipping?
Viewport clipping can reduce calculation by allowing concatenation of viewing and geometric
transformation matrices. Viewport clipping does requires that the transformation to device coordinates
be performed for all objects, including those outside the window area. For curved surface, the equations
Of the boundary and the parallelepiped planes are solved and intersection are calculated.
1.What is curve? Define it.
A curve is defined as, “a path of one dimension having only length”. A curve is an infinitely large set of
points. Each point has two neighbors except endpoints.
2.How to represent curves?
Curves can be described mathematically by nonparametric or parametric equations. Nonparametric
equations can be explicit or implicit. For a nonparametric curve, the coordinates y and z of a point on
the curve are expressed as two separate functions of the third coordinate x as the independent variable.
P = {x y z}T =X{x f(x) g(x)}T nonparametric explicit form
F(X,Y,Z) =0 nonparametric implicit form
G(x,y,z) =0
There are three problems with describing curves using nonparametric equations:
(1) If the slope of a curve at a point is vertical or near vertical, its value becomes infinity or very large.
(2) Shapes of most engineering objects are intrinsically independent of any coordinate system.
(3) If the curve is to be displayed as a series of point or straight-line segments, the computations
involved could be extensive.
3.What is surface?
Surface play on an important role in 3d computer graphics applications. Objects are represented as a
collection of surface. The curved surface is a rounded surface which is not flat. An object can have a
curved surface all around it. Such objects have only one surface throughout. Example of objects with the
curved surface all around are spheres.
4. How to design curves and surfaces?
Curved surfaces are most difficult to handle than lines and circles. Curves might be limited to two
dimensions or defined in three. Surfaces are always in three dimensions.
Designing of curves is an important area of computer graphics. The rational quadratic Bezier curves,
have been widely used for computer graphics.
Design of Surfaces include techniques Tensor Production Surface Path, (Ferguson’s Bi-cubic Surface
patch, Bezier Surface Patches), Boundary Interpolation Surface (Coon’s patches).
5.What is meant by Bezier curve?
A Bezier curve determined by defining polygon. Bezier curve have a number of properties that makes
them highly useful and convenient for curve and surface design. They are also easy to implement.
Therefore Bezier curves are widely available in Various CAD systems and in general graphics pacages.
6.Explain spline curve diagrammatically.
A spline curve differs from a Bezier curve in that it usually consists of more than one curve segments.
Each segment defined and influenced by only a few control points, which are coefficients of the spline
basis function polynomials. The degree of the curve is independent of the number of control points.
7.Write a short note on: Periodic B -Spline curve.
A periodic B-spline curve can be constructed as a simple special case of a “normal” one. The goal is to
have a seamless control polygon, and evaluation at first domain knot and last domain produce the same
point.
8.Write short note on: Rational B-spline curve.
A B-spline curve is a rational curve if the control points are specified with homogenous coordinates. It is
a ratio of two non-rotational B-spline basic functions , making it a vector valued piecewise rational
polynomials.
9.Compare Bezier and B-spline curve.
Bezier curve B-Spline curve
They are not designed with sharp bend They are designed with sharp bend and
and cornered curves. even corners.
A changes in a portion of a curve cause B-Spline has local over the curve. So ,
the whole of the curve to change . whole of the curve need not change.
They are special case of B-Spline curves. They are not special case of Bezier curves
They are less flexible. They are more flexible with large number
of control points.
They interpolate their first and Last control They do not interpolate their first and last
points. Control points.
Q. What is meant by hidden surface?
:- Hidden-surface determination is a process by which surfaces that should not be visible to
the user (for example, because they lie behind opaque objects such as walls) are prevented
from being rendered. Despite advances in hardware capability, there is still a need for
advanced rendering algorithms. The responsibility of a rendering engine is to allow for large
world spaces, and as the world’s size approaches infinity, the engine should not slow down
but remain at a constant speed.
Q. What is Coherence? Its types.
:- It is used to take advantage of the constant value of the surface of the scene. It is based on how
much regularity exists in the scene. When we moved from one polygon of one object to another
polygon of same object color and shearing will remain unchanged.
#Types of Coherence
1. Edge coherence: The visibility of edge changes when it crosses another edge or it also penetrates
a visible edge.
2. Object coherence: Each object is considered separate from others. In object, coherence
comparison is done using an object instead of edge or vertex. If A object is farther from object B,
then there is no need to compare edges and faces.
3. Face coherence: In this faces or polygons which are generally small compared with the size of the
image.
4. Area coherence: It is used to group of pixels cover by same visible face.
5. Depth coherence: Location of various polygons has separated a basis of depth. Depth of surface
at one point is calculated, the depth of points on rest of the surface can often be determined by a
simple difference equation.
6. Scan line coherence: The object is scanned using one scan line then using the second scan line.
The intercept of the first line.
7. Frame coherence: It is used for animated objects. It is used when there is little change in image
from one frame to another.
8. Implied edge coherence: If a face penetrates in another, line of intersection can be determined
from two points of intersection.
Q. Differentiate between Object space and Image space method

Object Space Image Space

1. Image space is object based. It concentrates on 1. It is a pixel-based method. It is concerned


geometrical relation among objects in the scene. with the final image, what is visible within
each raster pixel.

2. Here surface visibility is determined. 2. Here line visibility or point visibility is


determined.

3. It is performed at the precision with which each 3. It is performed using the resolution of the
object is defined, No resolution is considered. display device.

4. Calculations are not based on the resolution of the 4. Calculations are resolution base, so the
display so change of object can be easily adjusted. change is difficult to adjust.

5. These were developed for vector graphics system. 5. These are developed for raster devices.

6. Object-based algorithms operate on continuous 6. These operate on object data.


object data.

7. Vector display used for object method has large 7. Raster systems used for image space
address space. methods have limited address space.

8. Object precision is used for application where speed 8. There are suitable for application where
is required. accuracy is required.

9. It requires a lot of calculations if the image is to 9. Image can be enlarged without losing
enlarge. accuracy.

10. If the number of objects in the scene increases, 10. In this method complexity increase with
computation time also increases. the complexity of visible parts.

Depth Buffer Algorithm :- It is also called a Depth Buffer Algorithm. Depth buffer algorithm is
simplest image space algorithm. For each pixel on the display screen, we keep a record of the depth
of an object within the pixel that lies closest to the observer. In addition to depth, we also record
the intensity that should be displayed to show the object. Depth buffer is an extension of the frame
buffer. Depth buffer algorithm requires 2 arrays, intensity and depth each of which is indexed by
pixel coordinates (x, y).
Algorithm
For all pixels on the screen, set depth [x, y] to 1.0 and intensity [x, y] to a background value.
For each polygon in the scene, find all pixels (x, y) that lie within the boundaries of a polygon when
projected onto the screen. For each of these pixels:
(a) Calculate the depth z of the polygon at (x, y)
(b) If z < depth [x, y], this polygon is closer to the observer than others already recorded for this
pixel. In this case, set depth [x, y] to z and intensity [x, y] to a value corresponding to polygon's
shading. If instead z > depth [x, y], the polygon already recorded at (x, y) lies closer to the observer
than does this new polygon, and no action is taken.
3. After all, polygons have been processed; the intensity array will contain the solution.
4. The depth buffer algorithm illustrates several features common to all hidden surface algorithms.

5. First, it requires a representation of all opaque surface in scene polygon in this case.
6. These polygons may be faces of polyhedral recorded in the model of scene or may simply
represent thin opaque 'sheets' in the scene.
7. The IInd important feature of the algorithm is its use of a screen coordinate system. Before step
1, all polygons in the scene are transformed into a screen coordinate system using matrix
multiplication.
Z-buffer
Advantages of Z-buffer
• It is simple to use.
• Any kind of opaque surface can be handled/removed.
• It displays complex surface intersections easily.
• No depth storing of objects is needed and hence computational complexity is linear.
Disadvantages of Z-buffer
• Storage requirements are higher.
• Since depth storing is not done, a location in the z-buffer may have to be changed many
times depending on the number of surfaces representing the scene.
• It is a time-consuming process as it needs to scan and convert every polygon.
• The space involved is very large. At least it requires X*Y size of the buffers.
1.What is color?
A color in a computer graphic enhances the image by clearly depicting the information and identifying
the features that are unclear in black and white pictures.
2.What is light?
Light is a term used for a range of electromagnetic radiation which a human eye can easily detect. Color
is the visual perceptual property corresponding to the types called red, green, blue, and others in
humans.
3.Define the following terms:
Light-Light exhibits dual nature. The reason is that, sometimes light exhibits the characteristics of a
particle and sometimes it exhibits the characteristics of a wave.
Hue-Hue can be used to differentiate a white light from a red or green light.
Saturation-Saturation which describe the degree using its luminance.
4.Write a short note on: XYZ color model.
Based on the fact that no naturally occurring primaries can be used to match all visible colors, the
International Commission on Illumination defined three imaginary (non-realizable) primaries such as x,
y, and z in 1931.
The three primaries x, y, and z to replace red, green and blue. X, Y and Z represent vectors in a three
dimensional, additive color space. The three standard primaries are imaginary colors.
5.What is meant by RGB color model? State its advantages and disadvantages.
The Red, Green and Blue (RGB) color model used in color CRT monitors and color raster graphics
employs a Cartesian coordinates system. The RGB color model is an additive color model in which the
primary colors red, green, and blue light are combined together in different ways to reproduce a wide
range of colors.
Advantages
1.Almost every well-known application is complete with RCB, such as Microsoft Office, Adobe Creative
Suite (InDesign, Photoshop, etc.), and other digital editors.
Disadvantages
• RGB values are commonly not transferable between devices.
• Not perceptually uniform.
• Not perfect for identification of colors.
• Difficult to determine specific color.
• The difference between colors is not linear.
6.What is meant by texture?
Texture is the way how things look. Texture can be rough, smooth, soft, and uneven. A cotton
ball has a soft texture while sand has a rough texture. In computer graphics, a texture is a
bitmap image used to apply a design onto the surface of a 3D computer model.
7.Describe CMYK color model in detail.
CMYK is a subtractive color model, which is mainly used in color print production. This color
model is also called as a complementary RGB model.
In this color model, inks of colors, Cyan (c), Magenta (M), Yellow (Y) and Black (k) are used for
defining colors.
This CMY color model describes colors using a subtractive process, which closely matches the
working principle of the printer. The color space of CMYK color model is called subtractive.
8.Desribe the term texture mapping.
Texture mapping makes use of photographical or procedural generated textures. These
procedural generated patterns are made to appear very natural by subjecting them to noise or
random variation.
The texture mapping method involves scanning or digitizing the picture into another space, 2D
texture space. The sections of these spaces are mapped onto the surface which are depicted
by maintaining continuity.
9.Compare CMY color model and RGB color model.
BASIS FOR
RGB CMYK
COMPARISON

Basic Additive color model Substractive color model

Application Employed in computer Used as printing material

displays and web

graphics

Make use of Light Ink

Mechanism Transmission of light Reflection of light

involved

Contains Red+Green+Blue=White Cyan+Magenta+Yellow=Black

Size of the file Smaller Larger

You might also like