0% found this document useful (0 votes)
44 views12 pages

Unit 1 CG

The document discusses computer graphics, including its definition, areas of application like design, animation, and simulation, and how pictures are stored and displayed. Raster and vector graphics are introduced along with concepts like pixels, frame buffers, and display controllers in rendering images.

Uploaded by

shreyaspardhi01
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)
44 views12 pages

Unit 1 CG

The document discusses computer graphics, including its definition, areas of application like design, animation, and simulation, and how pictures are stored and displayed. Raster and vector graphics are introduced along with concepts like pixels, frame buffers, and display controllers in rendering images.

Uploaded by

shreyaspardhi01
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/ 12

UNIT – 1 Computer Graphics

1.1 Introduction
1.2 What is computer Graphics?
1.3 Area of Computer Graphics
1.3.1 Design and Drawing
1.3.2 Animation
1.3.3 Multimedia applications
1.3.4 Simulation
1.4 How are pictures actually stored and displayed
1.5 Difficulties for displaying pictures
1.6 Raster scan
1.7 Random scan
1.1 Introduction

In this unit, you are introduced to the basics of computer graphics.To


begin with we should know why one should study computer graphics. Its areas of
application include design of objects, animation, simulation etc.
Though computer graphics gained importance after the introduction of
monitors, these are several other input and output devices that are important for
the concept of computer graphics. They include high-resolution color monitors,
light pens, joysticks, mouse etc. You will be introduced to the working principles
of them. The concept of computer graphics simply means identifying their areas
of the screen that are to be illuminated and those that should not be. Most of the
regular figures like straight lines, circles etc, are represented by mathematical
equations. Given such equations, the first aspect of computer graphics is to convert
them to a sequence of points - picture cells or pixels that are to be illuminated (in
case of raster graphic display) or simply covert it to a curve that should be traced
on the screen. Since many times these jobs have to be very fast and efficient. You
will be introduced to a number of such algorithms and also their limitations.
We also look into the concept of transformations. Whenever as existing is to be
moved to a new place or say to be zoomed, the drawing is not done again on the
other hand; we only try to transform them. Simple transformation matrices for
various operations are also introduced.
1.2 What is computer Graphics?
Computer graphics is an art of drawing pictures, lines, charts, etc using computers
with the help of programming. Computer graphics is made up of number of pixels.
Pixel is the smallest graphical picture or unit represented on the computer screen.
Basically there are two types of computer graphics namely
1) Interactive computer graphics:
It is the computer graphics in which user can interact with the image on the
computer screen. Here exist two-way communication between the user and
the image. The image is totally under the control of user. Example: Playing
the computer game in the computer. Here user controls the image
completely. According to the user wish image makes the movements on the
screen.
2) Non-interactive computer graphics: it is the computer graphics in which user
does not have any kind of control over the image. Image is merely the product of
static stored program and will work according to the instructions given in the
program linearly. The image is totally under the control of program instructions
not under the user. Example: screen savers.
1.3 Areas of Computer Graphics
As ancient says “ a pixel is worth thousand words”, graphics is essential
everywhere to understand the things, concepts, etc easily. Computer graphics is
useful in almost all part of our life. In the following sections we are discussing
some of the popular areas of computer graphics.
1.3.1 Design and Drawing
In almost all areas of engineering, be it civil, mechanical, electronic etc., drawings
are of prime importance. In fact, drawing is said to be the language of engineers.
The ability of computers to store complex drawings and display them on demand
was one of the major attractions for using computers in graphics mode. Few
samples in this area are given below.
a) A mechanical engineer can make use of computer graphics to design nuts, bolts,
gears etc.
b) Civil engineer can construct the buildings, bridges, train tracks, roads etc on the
computer and can see in different angles
and views before actually putting the foundation for them. It helps in finalizing the
plans of these structures.
c) A text tile designer designs different varieties of designs through computer
graphics
d) Electronics and electrical engine rs design their circuits, PCB designs easily
through computer graphics.
1.3.2 Animation
Making the pictures to move on the graphical screen is called animation.
Animation really makes the use of computers and computer graphics interesting.
Animation brought the computers pretty close to the average individuals. It is the
well known principle of moving pictures that a succession of related pictures,
when flashed with sufficient speed will make the succession of pictures appear to
be moving. In movies, a sequence of such pictures is shot and is displayed with
sufficient speed to make them appear moving. Computers can do it in another way.
The properties of the picture can be modified at a fairly fast rate to make it appear
moving. For example, if a hand is to be moved, say, the successive positions of the
hand at different periods of time can be computed and pictures showing the
position of the hand these positions can be flashed on the screen. This led to the
concept of “animation” or moving pictures. In the initial stages, animation was
mainly used in computer games.
However, this led to a host of other possibilities. As we see later on
in this course, computers not only allow you to display the figures but also offer
you facilities to manipulate them in various ways – you can enlarge, reduce, rotate,
twist, morph (make one picture gradually change to another – like an
advertisement showing a cheetah change into a motor bike) and do a whole lot of
other things. Thus, a whole lot of films made use of computers to generate tricks.
In fact, several advertisement films and cartons strips are built with no actors at all
– only the computer generated pictures.
Animation also plays very important role in training through computer
graphics. If you have been given a bicycle you might have learn to ride it easily
with little effort, but if you have been given a flight, automatically it needs the
animated images to study the entire scenario of how flight takes off, on and
handling it during flying, contacting with and getting the help from
control room etc will be better explained using computers animation technique.
1.3.3 Multimedia applications
The use of sound cards to make computers produce sound effect led to other uses
of graphics. The concept of virtual reality, where in one can be taken through an
unreal experience, like going through an unbuilt house (to see how it feels inside,
once it is built) are possible by the use of computer graphics technology. In fact
the ability of computers to convert electronic signals (0 & 1) to data and then on
to figures and pictures has made it possible for us to get photographs of distant
planets like mars being reproduced here on the earth in almost real time.
1.3.4 Simulation
The other revolutionary change that graphics made was in the area of simulation.
Basically simulation is a mockup of an environment elsewhere to study or
experience it. The availability of easily interactive devices (mouse is one of them,
we are going to see a few other later in the course) made it possible to build
simulators. One example is of flight simulators, wherein the trainee, sitting in front
of a computer, can operate on the interactive devices as if he were operating on
the flight controls and the changes he is expected to see outside his window are
made to appear on the screen, so that he can master the skills of flight operations
before actually trying his hand on the actual flights. The graphic capabilities of
computers are used in a very large variety of areas like criminology (to recreate
faces of victims, assailants etc.,) medical fields (recreating pictures of internal
cavities, using signals sent by miniature cameras), recreation of satellite pictures
etc.
1.4 How are pictures actually stored and displayed?
All operations on computers are in terms of 0’s and 1’s and hence figures
are also to be stored in terms of 0’s and 1’s. Thus a picture file, when viewed inside
the memory, can be no different from other files – a string of Os and 1s. However,
their treatment when they are to be displayed makes the difference. Pictures are
actually formed with the help of frame-buffer display as follows Frame buffer
display contains a frame buffer, which is a storage device and stores the image in
terms of 0’s and 1’s. It contains the 0’s and 1’s in terms of 8’s, or multiples of 8’s
in a row. These 0’s and 1’s will be read by display controller one line at a time and
sent to the screen after converting them from digital to analog. The display
controller reads the contents of frame
buffer one line at a time or entire digits at time. These digital images after
converting into the analog will be displayed on the screen. The following figure
illustrates this---

Frame Buffer Display Controller Monitor

Figures can be stored and drawn in two ways – either by line drawing or by Raster
graphic methods. In the line drawing scheme, the figures are represented by
equations – for example a straight line can be represented by the equation y=mx+c,
a circle by x2+y2=r2 etc. If (x, y) are representative points, then all these (x,y) value
pairs which satisfy the equations form a part of the figure while those that do not,
lie outside the figure. Thus, to generate any figure, obviously the equation of the
figure is to be known. Then all points that satisfy the equation are evaluated. These
are the points to be illuminated on the screen.

A moving electronic beam, as we know illuminates the screen, or the


monitor. Whenever the beam is switched on, the electrons illuminate the
phosphorescent screen and display a point. In the line drawing schemes, this
beam is made to traverse the path of the figure to be traced and we get the figure
we need. For example, in the above cited example if the electron beam is made to
move from a to be along the points, we get the line.
The raster scan mechanism uses a different technique and is often
found more convenient to manipulate and operate with. In this case, a "frame
buffer", (a chunk of memory) is made to store the pixel values. (Remember, the
screen can be thought of as having beam made up of a number of horizontal rows
of pixels (picture cells), each pixel representing a point on the picture. In fact the
number of such horizontal and vertical points indicate higher resolutions and
therefore better pictures. Typical resolutions are like 640 X 480, 860 X 640, 1024
x 860 etc., where the figures indicate the number of rows and the number of pixels
along each row respectively on a computer screen (unlike in standard
mathematics) the top left hand point indicates the origin or the point (0,0) and the
distances are measured horizontally and vertically as shown).
Now, assuming a 1024 x 1024 point screen, any figure that is to be
displayed within this space. The "frame buffer" stores "status" of each of these
pixels - say 0 indicates the pixel is off and hence is not a part of the picture and
1 indicates it is a part of the picture, and is to be displayed. This data is used
to display the pictures.

1.5 Difficulties for displaying pictures


Unfortunately, the concept of graphics of displaying pictures is lot more
complicated than what has been described so far - evaluate the points using the
equations, store them in a file and use raster graphics methods or use simple line
drawing algorithms.
i) Stair case effects: Note that the pixel values are always integers (0,0) (0,1) (0,2)
- - - - - -- - -, but an algorithm to draw/manipulate pictures need not always return
integer values. Suppose the point at which two line meet, say is at (1.4, 2.7). What
do we do? Common sense suggests that we round off the values, by using any of
the standard algorithms. Excellent. 1.4 gets rounded of to 1 and 2.7 to 3. But
another value of 1.6 say gets rounded off to 2 and a value of 3.1 also gets rounded
of to 3. So, what do we have? The pointer 1.4 and 1.6, which should be very close
to each other, appear to be separated by a distance of 1 and not 0.2 in our figure,
i.e. the smoothness of a figure joining these points is lost. Alternately, the points
2.7 and 3.1, instead of appearing to be different, appear to be the same in our
picture. A no. of such adjustments makes the figure looks like a jagged one instead
of a smooth figure.
ii) Response time: Especially when talking of animation, the speed at which new
calculations are made and the speed at which the screen can interact are extremely
important. Imagine a running bus, shown on the screen. Each new position of the
bus (and it's surroundings, if needed) is to be calculated and sent to the screen and
the screen should delete the earlier position of the bus and display its new position.
All this should happen at a speed that convinces the viewer that the vehicle is
actually moving at the prescribed speed, otherwise a running vehicle would appear
like a "walking" bus or worse a "piecewise movement” bus. For this, most the
speed of the algorithm and the speed of the display devices are extremely
important. Further, the entire operation should appear smooth and not jerky
otherwise, especially in simulation applications, the effects can be dangers.
iii) What happens when the size of the picture exceeds
the size of the screen?:
Obviously, some areas of the picture are to be cut off. But this involves certain
considerations and needs to be addressed by software. [Which we will discuss
while discussing about clipping and windowing]
iv) Can the user create pictures directly on the
screen?:
Definitely all pictures can not be thought of in terms ofbregular geometric figures
and hence in terms of equations? Now, seeing a particular picture on the screen,
the viewer wants to change it slightly, say bend it slightly here, stretch it their etc.
Raster Scan Display

Raster can be explained as a rectangular collection of dots or points plotted.

An image is subdivided into various horizontal lines which are referred to


as scan lines which are then further divided into different pixels which helps in
the processing of an image.
Basic working of Raster Scan

 In this system, a beam of an electron is moved across the screen. It moves


from top to bottom considering one row at a time.
 As the beam of electron moves through each row, its intensity is
alternatively turned on and off which helps to create a pattern of spots that
are illuminated.
When each scan of the line is refreshed it returns to the left side of the
screen. This motion is known as Horizontal retrace.
 As a particular frame ends, the beam of electron moves to the left top
corner of the screen to move to another frame. This motion is referred to
as Vertical retrace.
 The picture is then stored in an area of memory which is referred to as
the frame buffer or refresh buffer.
 The buffer in a raster scan is that area that is responsible for containing
intensity of the various points on the screen.

The values stored in the buffer are then fetched and traced over scan lines one by
one on the screen.
 The image formed through this raster scan is known as a raster image. The
quality of this image is determined by the number of pixels which is termed
as the resolution of the image.
 The amount of information each pixel represents is known as the color
depth of the image.
 The raster graphics system of high quality contains 24 bits per pixel in the
frame buffer. This is referred to as a full color or true color system.
Refreshing of raster scan displays is carried out at the rate of 60 to 80
frames per second.

Interlacing

A TV video signal is graphically interlaced, which means every full screen of


information is made up of two separate fields which include the odd field and
even field. First, the odd lines are printed on the graphics screen. Then, the even
lines are printed in between the odd lines before the odd lines fade away. This all
happens faster than any human eye can perceive.

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

Disadvantages:
1. Low Resolution
2. Expensive

Random Scan Display

In Random Scan Display a beam of the electron is directed only to the screen
areas where any picture has to be displayed or drawn on the screen. It is also
termed as vector display, as it displays or draws a picture in the form of one line
at a time. It can draw and refresh lines on the screen of a picture in any sequence
not particularly specific.

Basic working of random scan display

 Random scan monitors are used to draw a picture in one line at a time and
are thus also referred to as vector displays.
 The cathode ray tube when operates as a random scan display device
directs the beam of an electron only to those areas of the screen where
display or a picture has to be drawn.
 To draw a picture or display it on the screen the system goes through a line
or set of commands and draws each of them one at a time in a line turn by
turn.

The refresh rate here depends on the number of lines that are to be displayed on
the screen and are designed so that they draw the component lines of the picture
30 to 60 times in a second.
They have a high resolution of pictures and produce smooth line drawing. It's
that smooth that while zooming also it doesn't spread.

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

Review Questions

1. The art of representing moving pictures is called ________________________-


2. The concept of changing one picture gradually into another is called
_____________
3. The combination of calculations, sound and pictures in computer is called
__________
4. Building a mock up of an environment with the aim of studying the same is
called __________________
5. The equation of a straight line is given by _______________________
6. A block of memory to store pixel values is called ________________________
7. The number of pixels available for display of pictures is indicated by
________________
8. The concept of creating pictures directly on the screen is called
________________
Answers
1. Animation
2. Morphing
3. Multimedia
4. Simulation
5. y= mx+c
6. Frame buffer
7. Resolution
8. Interactive graphics.

You might also like