Gv101 Module 1
Gv101 Module 1
Gv101 Module 1
STATE
AGRICULTURAL
UNIVERSITY
Graphics
and
Visual
Computing
GV101
1
JOMAR S. BARICANTE
CREAM - DCSA
GV101 (Graphics and Visual Computation)
Course Description:
This course from CMO 25 series of 2015 is a recommended elective that provides detailed
study of computer graphics, 2 D and 3 D transformations, representations, and visualization. This
course aims to introduce and study the various techniques used to model 2D and 3D objects and
environments and to present its important aspects and it can be easily visualized such as photo realistic
rendering of 2D, 3D scenes and animation.
Number of Units/Credit: 3 Units (3 hours Laboratory and 2 hours Lecture per week)
PSAU VISION:
To be the Premier Science and Agro-ecological University
PSAU MISSION:
Mainstream science and practice of agroecological and industrial technologies through distinctive
instruction, research, extension and entrepreneurship for people and nature
PSAU GOAL:
To transform PSAU into an effective institution of higher learning for agroecological education and allied
fields, impact driven research, extension and entrepreneurship uplifting the welfare of the people and
nature
2
Week 1 | Module 1
Fundamentals of Computer Graphics
At the end of this module you are expected to:
1. Define Computer Graphics
2. Be Informed about the History of Computer Graphics
3. Understand the significance of Computer Graphics in our daily living
4. Be knowledgeable about the fundamentals of Computer Graphics in computer software and hardware
Computer Graphics involves technology to access. The Process transforms and presents information
in a visual form. The role of computer graphics insensible. In today life, computer graphics has
now become a common element in user interfaces, T.V. commercial motion pictures. In computer
graphics, two or three-dimensional pictures can be created that are used for research. Many
hardware devices algorithm has been developing for improving the speed of picture generation with the
passes of time. It includes the creation storage of models and image of objects. These models for
various fields like engineering, mathematical and so on.
Today computer graphics is entirely different from the earlier one. It is not possible. It is an interactive
user can control the structure of an object of various input devices.
3
Why computer graphics is important?
Suppose a shoe manufacturing company want to show the sale of shoes for five years. For this vast
amount of information is to store. So, a lot of time and memory will be needed. This method will be tough
to understand by a common man. In this situation graphics is a better alternative. Graphics tools are
charts and graphs. Using graphs, data can be represented in pictorial form. A picture can be
understood easily just with a single look.
Interactive computer graphics work using the concept of two-way communication between
computer users. The computer will receive signals from the input device, and the picture is
modified accordingly. Picture will be changed quickly when we apply command. One of the most
important issue when selling a product is its design, when a customer purchase product, they base their
choice on the packaging rather than the contents. Psychologically speaking, attractive images
immediately convey the notion of high-quality contents.
We can see examples of this concept everywhere: think of the car industry, where aesthetics is
paramount, or the enormous interest that novel cell phone or tablet designs can generate. In the movie
industry, films with computer graphics and realistic 3D-effects often dominate the box office. The same
notion goes for software, where an embellished interface, proper menu arrangement and up-to-
date graphics and effects are all critical components of the overall user experience, and often form the
deciding factors for one package over another.
Graphics Applications
5
Figure 4. Computer Graphics in Training
6
1.2 History of Computer Graphics
Early 60's:
• Computer animations for physical simulation; Edward
Zajac displays satellite research using CG in 1961
• 1963: Sutherland (MIT)
Sketchpad (direct manipulation, CAD)
Calligraphics (vector) display devices
Interactive techniques
First mouse (Douglas Englebart)
• 1968: Evans & Sutherland founded
• 1969: First SIGGRAPH
Late 60's to late 70's:
Utah Dynasty
• 1970: Pierre Bezier develops Bezier curves
• 1971: Gouraud Shading
• 1972: Pong (first computer game) developed
• 1973: Westworld, the first film to use computer
animation
• 1974: Ed Catmull develops z-buffer (Utah)
First Computer Animated Short, Hunger. Keyframe
animation and morphing.
• 1975: Bui-Toung Phong creates Phong Shading (Utah)
Martin Newel models a 3D teapot with Bezier
patches (Utah)
7
Late 90's:
8
1.3 Computer Graphics Systems
A computer graphics system is a computer system; as such, it must have all the components of a
general-purpose computer system. Let us start with the high-level view of a graphics system, as shown
in the block diagram in figure below. There are six major elements in our system:
1. Input devices
2. Central Processing Unit
3. Graphics Processing Unit
4. Memory
5. Frame buffer
6. Output devices
This model is general enough to include workstations and personal computers, interactive game
systems, mobile phones, GPS systems, and sophisticated image generation systems. Although most of
the components are present in a standard computer, it is the way each element is specialized for
computer graphics that characterizes this diagram as a portrait of a graphics system.
9
LCD (Liquid Crystal Display)
It is a type of flat panel display
which uses liquid crystals in its primary
form of operation. LCDs have a
large and varying set of use cases for
consumers and businesses, as
they can be commonly found in
smartphones, televisions, computer
monitors and instrument panels.
10
Cathode Ray Tubes (CRTs)
Inventor: Karl Ferdinand Braun
Components of CRT:
Main Components of CRT are:
1. Electron Gun: Electron gun consisting of a series of elements, primarily a heating filament (heater)
and a cathode. The electron gun creates a source of electrons which are focused into a narrow beam
directed at the face of the CRT.
11
2. Control Electrode: It is used to turn the electron beam on and off.
3. Focusing system: It is used to create a clear picture by focusing the electrons into a narrow beam.
4. Deflection Yoke: It is used to control the direction of the electron beam. It creates an
electric or magnetic field which will bend the electron beam as it passes through the area. In a
conventional CRT, the yoke is linked to a sweep or scan generator. The deflection yoke which is
connected to the sweep generator creates a fluctuating electric or magnetic potential.
5. Phosphorus-coated screen: The inside front surface of every CRT is coated with phosphors.
Phosphors glow when a high-energy electron beam hits them. Phosphorescence is the term
used to characterize the light given off by a phosphor after it has been exposed to an electron beam.
Random-scan monitors are also known as vector displays or stroke-writing displays or calligraphic
displays.
Advantages:
• A CRT has the electron beam directed only to the parts of the screen where an image is to be
drawn.
• Produce smooth line drawings.
• High Resolution
Disadvantages:
• Random-Scan monitors cannot display realistic shades scenes.
12
Televisions in our house are based on Raster Scan Method. The raster scan system can store
information of each pixel position, so it is suitable for realistic display of objects. Raster Scan provides a
refresh rate of 60 to 80 frames per second.
Frame Buffer is also known as Raster or bit map. In Frame Buffer the positions are called picture
elements or pixels. Beam refreshing is of two types. First is horizontal retracing and second is vertical
retracing. When the beam starts from the top left corner and reaches the bottom right scale, it will again
return to the top left side called at vertical retrace. Then it will again more horizontally from top to bottom
call as horizontal retracing shown in fig:
For non-interlaced display refresh rate of 30 frames per second used. But it gives flickers. For interlaced
display refresh rate of 60 frames per second is used.
Advantages:
• Realistic image
• Million Different colors to be generated
• Shadow Scenes are
possible. Disadvantages:
• Low Resolution
13
• Expensive
Frame Buffers
15
Display Technology: DMD / DLP
16
Graphics Display Processor
It is interpreter or piece of hardware that converts display processor code into pictures. It is one of
the four main parts of the display processor
Parts of Display Processor
1. Display File Memory: It is used
for generation of the picture. It is
used for identification of graphic
entities.
2. Display Controller:
It handles interrupt, It maintains
timings and It is used for
interpretation of instruction.
3. Display Generator:
It is used for the generation of
character and It is used for the Figure 21. Block Diagram of Display System
generation of curves.
4. Display Console:
It contains CRT, Light Pen, and Keyboard and deflection system.
Input Devices
The Input Devices are the hardware that is used to transfer transfers input to the computer. The data
can be in the form of text, graphics, sound, and text. Output device display data from the memory of the
computer. Output can be text, numeric data, line, polygon, and other objects.
17
Output Devices
Printer
Printer is the most important output device, which is used to print data on paper. It is an
electromechanical device, which accepts data from a computer and translates them into form
understand by users.
Following are Output Devices:
1. Printers
2. Plotters
1. Impact Printers: The printers that print the characters by striking against the ribbon and onto the
papers are known as Impact Printers.
These Printers are of two types:
• Character Printers
• Line Printers
2. Non-Impact Printers: The printers that print the characters without striking against the ribbon and
onto the papers are called Non-Impact Printers. These printers print a complete page at a time,
therefore, also known as Page Printers.
Page Printers are of two types:
18
• Laser Printers
• Inkjet Printers
Dot Matrix Printers:
Dot matrix has printed in the form of dots. A printer has a head
which contains nine pins. The nine pins are arranged one
below other. Each pin can be activated independently. All or
only the same needles are activated at a time. When needless
is not activated, and then the tip of needle stays in the head.
When pin work, it comes out of the print head. In nine pins
printer, pins are arranged in 5 * 7 matrixes.
Figure 24. Dot Matrix Printer
These are line printers, which prints one line at a time. It consists
of a drum. The shape of the drum is cylindrical. The drum is solid
and has characters embossed on it in the form of vertical bands.
The characters are in circular form. Each band consists of some
characters. Each line on drum consists of 132 characters.
Because there are 96 lines so total characters are (132 * 95) = 12,
672. Drum contains several hammers also.
19
Non-Impact Printers:
Inkjet Printers:
These printers use a special link called electrostatic ink. The printer
head has a special nozzle. Nozzle drops ink on paper. Head
contains up to 64 nozzles. The ink dropped is deflected by the
electrostatic plate. The plate is fixed outside the nozzle. The
deflected ink settles on paper.
0 Figure 28. Inkjet Printer
Laser Printers:
These are non-impact page printers. They use laser lights to
produces the dots needed to form the characters to be printed on a
page & hence the name laser printers.
Plotters
Plotters are a special type of output device. Figure 29. Laser Printer
• It can produce high-quality output on large sheets.
• It is used to provide the high precision drawing.
• It can produce graphics of various sizes.
The speed of producing output is high.
It is suitable for applications:
• Architectural plan of the building.
• CAD applications like the design of mechanical
components of aircraft.
Figure 30. Plotter
• Many engineering applications.
Drum Plotter:
It consists of a drum. Paper on which design is made is kept
on the drum. The drum can rotate in both directions. Plotters
comprised of one or more pen and penholders. The holders
are mounted perpendicular to drum surface. The pens are kept
in the holder, which can move left to the right as well as right to
the left. The graph plotting program controls the movement of
pen and drum.
20
Flatbed Plotter:
It is used to draw complex design and graphs, charts.
The Flatbed plotter can be kept over the table. The plotter
consists of pen and holder. The pen can draw characters
of various sizes. There can be one or more pens and pen
holding mechanism. Each pen has ink of different color.
Different colors help to produce multicolor design of
document. The area of plotting is also variable. It can
vary A4 to 21'*52'. It is used to draw:
• Cars
• Ships
• Airplanes
• Shoe and dress designing
• Road and highway design Figure 32. Flatbed Plotte
Algorithms
Several basic algorithms are needed:
1. Transformation: Convert representations of models/primitives from one coordinate system to
another
2. Clipping/Hidden surface removal: remove primitives and part of primitives that are not visible on
the display
3. Rasterization: Convert a projected screen space primitive to a set of
pixels. Advanced algorithms: 21
Picking: select a 3D object by clicking an input device over a pixel location.
25
Table 2. Two-dimensional array of numbers ranging between 0 and 255.
128 30 123
123 77 89
80 255 255
Each number represents the value of the function f(x,y) at any point. In this case the value 128, 230
,123 each represents an individual pixel value. The dimensions of the picture are the dimensions of
this two- dimensional array.
Computer graphics deals with the formation of images from object models, rather than the
image is captured by some device. For example: Object rendering. Generating an image from an
object model. Such a system would look something like this.
Image Processing
Digital image processing deals with manipulation of digital images through a digital computer. It
is a subfield of signals and systems but focus, particularly on images. DIP focuses on developing a
computer system that can perform processing on an image. The input of that system is a digital
image and the system process that image using efficient algorithms and gives an image as an output.
The most common example is Adobe Photoshop. It is one of the widely used application for
processing digital images.
26
Figure 35. Image Processing
In figure 35 shows an image has been captured by a camera and has been sent to a digital
system to remove all the other details, and just focus on the water drop by zooming it in such a way
that the quality of the image remains the same.
Analog image processing vs Digital image processing
Analog image processing is done on analog signals. It includes processing on two dimensional
analog signals. In this type of processing, the images are manipulated by electrical means by varying
the electrical signal. The common example include is the television image.
Digital image processing has dominated over analog image processing with the passage of
time due its wider range of applications. The digital image processing deals with developing a digital
system that performs operations on a digital image.
Raster Graphics
Raster images use bit maps to store information. This means a large file needs a large bitmap.
The larger the image, the more disk space the image file will take up. As an example, a 640 x 480
image requires information to be stored for 307,200 pixels, while a 3072 x 2048 image (from a 6.3
Megapixel digital camera) needs to store information for a whopping 6,291,456 pixels. We use
algorithms which compress images to help reduce these file sizes. Image formats like jpeg and gif
are common compressed image formats. Scaling down these images is easy but enlarging a bitmap
makes it pixelated or simply blurred. Hence for images which need to scale to different sizes, we use
vector graphics. 27
File extensions: .BMP, .TIF, .GIF, .JPG
Vector Graphics
Making use of sequential commands or mathematical statements or programs which place
lines or shapes in a 2-D or 3-D environment is referred to as Vector Graphics. Vector graphics are
best for printing since it is composed of a series of mathematical curves. As a result, vector graphics
print crisply even when they are enlarged. In physics: A vector is something which has a magnitude
and direction. In vector graphics, the file is created and saved as a sequence of vector statements.
Rather than having a bit in the file for each bit of line drawing we use commands which describe
series of points to be connected.
AS a result, a much smaller file is obtained. File extensions:
.SVG, .EPS, .PDF, .AI, .DXF
28
Guide Questions 1
Answer the following to check what you have learned from the discussion so far. Check
your answer from the provided answer key at the end of this unit.
1. What is Computer Graphics?
2. What are the three main tasks of Computer Graphics?
3. What are the parts of display processor?
4. What are the two classification of printers?
5. What is the main difference between Vector and Raster graphics?
Question 1: Computer Graphics is the creation of pictures with the help of a computer. It is
an art of drawing pictures on computer screens with the help of programming. It involves
computations, creation, and manipulation of data. In other words, we can say that computer
graphics is a rendering tool for the generation and manipulation of images.
Question 2: The three main tasks of Computer Graphics are the
following
1. modeling: it is the creating and representing the geometry of objects in the 3D world
2. rendering: it is the generating 2D images of the objects
3. animation: it is the describing how objects change in time
Question 3: The parts of Display processor are the following
1. Display File Memory: It is used for generation of the picture. It is used for identification
of graphic entities.
2. Display Controller: It handles interrupt, it maintains timings and It is used for
interpretation of instruction.
3. Display Generator: It is used for the generation of character and It is used for the
generation of curves.
4. Display Console: It contains CRT, Light Pen, and Keyboard and deflection system.
Question 4: The two classification of printers are the following:
1. Impact Printers: These are printers that print the characters by striking against the ribbon
and onto the papers are known as Impact Printers.
2. Non-Impact Printers: These are printers that print the characters without striking
against the ribbon and onto the papers are called Non-Impact Printers. These printers print
a complete page at a time, therefore, also known as Page Printers.
Question 5: The main difference between vector and raster graphics is that raster graphics
are composed of pixels, while vector graphics are composed of paths. A raster graphic,
29
such as a gif or jpeg, is an array of pixels of various colors, which together form an image.
Key points
1. Computer Graphics: It is the creation of pictures with the help of a computer.
2. Modeling: It is the creating and representing the geometry of objects in the 3D world
3. Rendering: It is the generating 2D images of the objects
4. Animation: It is the describing how objects change in time
5. LCD (Liquid Crystal Display): It is a type of flat panel display which uses liquid crystals in its
primary form of operation.
6. Light Emitting Diode LED Display: It is a flat panel display that uses light emitting diodes as
the video display.
7. Cathode-Ray Tube (CRT): It is a vacuum tube that contains one or more electron guns and a
phosphorescent screen and is used to display
images.
8. Electron gun: It consist of a series of elements, primarily a heating filament (heater) and a
cathode.
9. Control Electrode: It is used to turn the electron beam on and off.
10.Focusing system: It is used to create a clear picture by focusing the electrons into a narrow
beam.
11.Deflection Yoke: It is used to control the direction of the electron beam. It creates an electric
or magnetic field which will bend the electron beam as it passes through the area.
12.Random Scan Display: it also known as vector displays or stroke-writing displays or
calligraphic displays.
13.Raster Scan Display: It is based on intensity control of pixels in the form of a rectangular box
called Raster on the
screen.
14.Frame Buffer: It is also known as Raster or bit map. In Frame Buffer the positions are called
picture elements or pixels. Beam refreshing is of two types.
15.Display File Memory: It is used for generation of the picture. It is used for identification of
graphic entities.
16.Display Controller: It handles interrupt, it maintains timings and It is used for
interpretation of instruction.
17.Display Generator: It is used for the generation of character and It is used for the generation
of
curves.
18.Display Console: It contains CRT, Light Pen, and Keyboard and deflection system.
19.Input Devices: These are the hardware that is used to transfer transfers input to the computer.
The data can be in the form of text, graphics, sound, and text.
20.Output devices: These are display data from the memory of the computer, It can be text,
numeric data, line, polygon, and other objects.
21.Printers: It is the most important output device, which is used to print data on paper. It is
an electromechanical device, which accepts data from a computer and translates them
into form understand by users.
22.Impact Printers: These are printers that print the characters by striking against the ribbon and
onto the papers are known as Impact Printers.
23.Non-Impact Printers: These are printers 30 that print the characters without striking
against the ribbon and onto the papers are called Non-Impact Printers. These printers print a
complete page at a time, therefore, also known as Page Printers.
24.Dot matrix: Type of printer that has printed in the form of dots.
25.Daisy Wheel Printers: These printer Head is lying on a wheel and Pins corresponding
to characters are like petals of Daisy.
26.Drum Printers: These are line printers, which prints one line at a time. It consists of a drum.
The shape of the drum is cylindrical.
27.Chain Printers: These are called as line printers. These are used to print one line at
a line. Basically, chain consists of links.
28.Inkjet Printers: These printers use a special link called electrostatic ink. The printer head has
a special nozzle.
29.Laser Printers: These are non-impact page printers. They use laser lights to produces the
dots needed to form the characters to be printed on a page & hence the name laser printers.
30.Plotters: It a special type of output device, that can produce high-quality output on large
sheets,
and It is used to provide the high precision drawing which can produce graphics of various sizes
31.Drum Plotter: It consists of a drum. Paper on which design is made is kept on the drum. The
drum can rotate in both directions.
32.Flatbed Plotter: It is used to draw complex design and graphs, charts. It can be kept over the
table.
33.General Purpose Packages: It has a basic Functions in a general package include
those for generating picture components (straight lines, polygons, circles, and other figures),
setting color and intensity values, selecting views, and applying transformations.
34.Special Purpose Packages: These packages are designed for non-programmers, so that
these users can use the graphics packages, without knowing the inner details.
35.Digital image processing: it deals with manipulation of digital images through a digital
computer.
It is a subfield of signals and systems but focus, particularly on images.
31
36.Pixel: It is simply the smallest addressable element of a picture represented on a screen.
37.Bitmap: It is a mapping from some domain (for example, a range of integers) to bits, that is,
values which are zero or one.
References and Supplementary Materials
Books
1. Donald D Hearn, M. Pauline Baker, Computer Graphics C version, Pearson Education.
2. James D. Foley, Andries van Dam, Steven K. Feiner, John F. Hughes, Computer
Graphics: Principles & Practice in C, Addison Wesley Longman.
3. Zhigang Xiang, Roy A Plastock, Computer Graphics, Schaums Outline, TMH.
32