Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
29 views55 pages

Unit 1

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)
29 views55 pages

Unit 1

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/ 55

Computer

Graphics
UNIT 1: GRAPHICS SYSTEMS
What is Computer Graphics?
•Computer graphics is a process associated with producing images by digital rendering of a picture
model.

•Computer graphics is a process of generation of images of virtual scenes using computer


hardware.

•Computer graphics is a human oriented system that uses the capabilities of a computer to create,
transform and display pictorial and symbolic data.

•Computer graphics is the use a computer hardware and software to create, manipulate and
present picture and image.

•Computer graphics is a pictorial representation and manipulation of data by a computer.


Why Computer Graphics used?
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.
1. Application Areas of Graphics
Systems
1. Presentation Graphics
2. Entertainment
3. Education & Training
4. Image Processing
5. Advertisement
6. Simulation Modelling
7. Architecture
8. Virtual Reality
1.1. 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
1.2. Entertainment
•Computer Graphics are now commonly used in making motion pictures, music
videos and television shows.
•Today, Computer graphics has emerged as a new form of art.
•Examples:
• In 1992, Michel Jackson music album called Black and White:
• Faces of different people were replaced by one another (using morphing technique of computer
graphics)
• Hollywood Movies likes, Terminator, Jurassic park, Little Stuart
1.3. Education & 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.

•Examples:
• Virtual Schools
• Flight Simulator
• Development
• C++ (OpenGL Library)
1.4. Image Processing
Image processing mainly deals with manipulating and interpreting the existing images rather than
developing and creating them.

Examples:
• Weather Forecasting
• Medical Science (CAT [computerized axial tomography] scan)
2. Application Areas of Computer
Graphics
1. Computer Graphics Files

2. Raster Graphics and Vector Graphics


2.1 Computer Graphics Files
•A graphics file is a computer file that contains an image or picture in digital format. Graphics files
are often large, so they're often stored in compressed formats such as GIF or jpeg. The image is
an example of a graphics file.
•Common Graphics file formats
• TIFF (.tif, .tiff): Tagged Image File Format
• Bitmap (.bmp)
• JPEG (.jpg, .jpeg): Joint Photographic Experts Groups
• GIF (.gif): Graphics Interchange Format
• PNG (.png): Portable Network Graphics
• EPS (.eps): Encapsulated PostScript file (Using in Adobe Illustrator or CorelDRAW)
• RAW Image Files (.raw, .cr2, .nef, .orf, .sr2, and more): (created by a camera or scanner)
2.2 Raster Graphics and Vector
Graphics
•Digital graphic files will generally fall into one of two categories—vector or raster.

•Vector graphics, such as logo files, use intricate paths made up of points and lines to create an
image.

•Raster graphics, such as digital photographs, are created using a grid of tiny pixels.
Vector Graphics
Vector files, made up of points and lines to create paths, can be scaled up and down without
losing quality. This makes vector files the best format for graphic assets such as illustrations,
icons and company logos, as the same file can be used for designs ranging from a mobile app to a
large billboard without sacrificing quality or increasing file size.

Probably the most common example of vector-based files that we use daily without even realizing
are font files. Each letter that you type is a vector graphic. You can increase text size or zoom in as
much as you want and fonts will still remain clear when viewed online or in standard editable
formats such as Word documents.
Raster Graphics
Raster images are made up of many tiny squares called pixels and are often referred to as
'bitmap' images. When zoomed in closely, the individual pixels can be observed. The resolution of
a raster file is referred to as DPI (dots per inch) or PPI (points per inch), and is the main
determining factor for increasing file size.
File Extensions ( Vector & Raster )
Typically you can distinguish between raster and vector formats by looking closely at the edges of
graphic elements like text and logos. File extensions will also suggest which category a file will fall
under, though there are always exceptions to the rule.

Both: .pdf Portable Document Format (PDF)

Vector Raster
.jpg Joint Photographic Experts Group (JPEG) .eps Encapsulated PostScript File (EPS)
.png Portable Network Graphics (PNG) .svg Scalable Vector Graphics (SVG)
.gif Graphics Interchange Format (GIF) .ai Adobe Illustrator File
.tiff Tagged Image File Format (TIFF) .cdr Corel Draw File
.psd Adobe Photoshop File
.pat Corel Paint File
3. Video Display Devices
The display device is an output device used to represent the information in the form
of images (visual form). Display systems are mostly called a video monitor or Video
display unit (VDU).
Display devices are designed to model, display, view, or display information. The
purpose of display technology is to simplify information sharing.
Today, the demand for high-quality displays is increasing.
3. Video Display Devices
1. Cathode-Ray Tube(CRT) or Refresh CRT

2. Color CRT Monitor

3. Liquid crystal display(LCD)

4. Light Emitting Diode(LED)

5. Direct View Storage Tubes(DVST)

6. Plasma Display

7. 3D Display
3.1 Cathode-ray Tube (CRT)
•Invented by Karl Ferdinand Braun, the Nobel Price winner in 1897, It was a cold cathode tube.

•The hot cathode tube in year 1922 was introduced by H.W. Weinhart and J.B Johnson.

•Cathode ray tube is a particular type of vacuum tube that displays images when an electron beam
collides on the radiant surface.
3.1.1 Component of CRT
•Electron Gun: The electron gun is made up of several elements, mainly a heating filament (heater)
and a cathode. The electron gun is a source of electrons focused on a narrow beam facing the
CRT.
•Focusing & Accelerating Anodes: These anodes are used to produce a narrow and sharply focused
beam of electrons.
•Horizontal & Vertical Deflection Plates: These plates are used to guide the path of the electron the
beam. The plates produce an electromagnetic field that bends the electron beam through the
area as it travels.
•Phosphorus-coated Screen: The phosphorus coated screen is used to produce bright spots when
the high-velocity electron beam hits it.
There are two ways to represent an object on the screen:

1. Raster Scan:

It is a scanning technique in which the electron beam moves along the screen. It moves
from top to bottom, covering one line at a time.

A raster scan is based on pixel intensity control display as a rectangular box on the screen
called a raster.

Picture description is stored in the memory area called as Refresh buffer, or Frame
Buffer.

Frame buffer is also known as Raster or Bitmap. Raster scan provides the refresh rate of
60 to 80 frames per second.
For Example: Television

The beam refreshing has two types:

1. Horizontal Retracing
2. Vertical Retracing

When the beam starts from the top left corner and reaches bottom right, and again return to the top
left, it is called the vertical retrace.

It will call back from top to bottom more horizontally as a horizontal reversal.
Advantages & Disadvantages
(CRT - Raster Scan)

Advantages Disadvantages
1. Real image 1. Less resolution
2. Many colors to be produced 2. Display picture line by line
3. Dark scenes can be pictured 3. More costly
2. Random Scan (Vector scan):

It is also known as stroke-writing display or calligraphic display. In this, the


electron beam points only to the area in which the picture is to be drawn.

It uses an electron beam like a pencil to make a line image on the screen. The
image is constructed from a sequence of straight-line segments. On the screen,
each line segment is drawn by the beam to pass from one point on the screen to
the other, where its x & y coordinates define each point.

After compilation of picture drawing, the system cycle back to the first line and
create all the lines of picture 30 to 60 times per second.
Fig: A Random Scan display draws the lines of an object in a specific order
Advantages & Disadvantages
(CRT – Random(Vector) Scan)

Advantages Disadvantages
1. High Resolution 1. It does only the wireframe.
2. Draw smooth line Drawing 2. It creates complex scenes due to
flicker.
3.2 Color CRT
•It is similar to a CRT monitor.
•The basic idea behind the color CRT monitor is to combine three basic colors- Red,
Green, and Blue. By using these three colors, we can produce millions of different
colors.
•The two basic color display producing techniques are:
1. Beam–Penetration Method
2. Shadow–Mask Method
3.2.1 Beam–Penetration Method
•It is used with a random scan monitor for displaying pictures. There are two phosphorus layers-
Red and Green are coated inside the screen. The color shown depends on how far the electron
beam penetrates the phosphorus surface.

•A powerful electron beam penetrates the CRT, it passes through the red layer and excites the
green layer within.

•A beam with slow electrons excites only the red layer.

•A beam with the medium speed of electrons, a mixture of red and green light is emitted to display
two more colors- orange and yellow.
Advantages & Disadvantages
(Beam–Penetration Method)

Advantages Disadvantages
1. Better Resolution 1. Only four possible colors
2. Half cost 2. Time Consuming
3. Inexpensive
3.2.2 Shadow–Mask Method
• It is used with a raster scan monitor for displaying pictures. It has more range of color than
the beam penetration method. It is used in television sets and monitors.

Structure:
It has three phosphorus color dots at each position of the pixel.

1. First Dot: Red color

2. Second Dot: Green color

3. Third Dot: Blue color


1. It has three different guns. Each for one color.
2. It has a metal screen or plate just before the phosphorus screen, named
“Shadow-Mask.”
3. It also has a shadow grid just behind the phosphorus coated screen with tiny
holes in a triangular shape.
Working:

• A Shadow Mask is a metal plate with tiny holes present inside a color monitor.

• A Shadow Mask directs the beam by consuming the electrons so that the beam hits only the desired
point and displays a resulting picture.

• It has three different guns. These guns direct their beams to shadow mask, which allows them to
pass. It is a task of a shadow mask to direct the beam on its particular dot on the screen and produce
a picture on the screen.

• A Shadow Mask can display a wider range of pictures than beam penetration.
Advantages & Disadvantages
(Shadow–Mask Method)

Advantages Disadvantages
1. Display a wider range picture. 1. Difficult to cover all three beams on
2. Display realistic images. the same hole.
3. In-line arrangement of RGB color. 2. Poor Resolution.
3.3 Liquid crystal display (LCD)
•The LCD depends upon the light modulating properties of liquid crystals.

•LCD is used in watches and portable computers. LCD requires an AC power supply instead of DC,
so it is difficult to use it in circuits.

•It generally works on flat panel display technology. LCD consumes less power than LED. The LCD
screen uses the liquid crystal to turn pixels on or off.

•Liquid Crystals are a mixture of solid and liquid. When the current flows inside it, its position
changes into the desired color.

•For Example: TFT (Thin Film Transistor)


Advantages & Disadvantages
(Liquid crystal display (LCD))

Advantages Disadvantages
1. Produce a bright image 1. Fixed aspect ratio & Resolution
2. Energy efficient 2. Lower Contrast
3. Completely flat screen 3. More Expensive
3.4 Light Emitting Diode (LED)
•LED is a device which emits when current passes through it. It is a semiconductor device.

•The size of the LED is small, so we can easily make any display unit by arranging a large number
of LEDs.

•LED consumes more power compared to LCD. LED is used on TV, smartphones, motor vehicles,
traffic light, etc.

•LEDs are powerful in structure, so they are capable of withstanding mechanical pressure. LED
also works at high temperatures.
Advantages & Disadvantages
(Light Emitting Diode (LED))

Advantages Disadvantages
1. The Intensity of light can be 1. More Power Consuming than LCD.
controlled.
2. Low operational Voltage.
3. Capable of handling the high
temperature.
3.5 Direct View Storage Tube
(DVST)
•It is used to store the picture information as a charge distribution behind the phosphor-coated
screen.
•Direct View Storage Tube (DVST) resembles CRT as it uses electron gun to draw picture and
phosphor coated screen to display it.
•The phosphor used in this is of high persistence.
•DVST does not use refresh buffer or frame buffer to store picture definition. Picture definition is
stored in inside CRT in form positive charged distribution. Because of this reason DVST is knows
as Storage Type CRT.
•In DVST no refreshing is required as result picture drawn on DVST will be seen for several minutes
before fading.
Various components of DVST
1. Electron guns –
Two electron guns are used in DVST : Primary Gun and Flood Gun. Primary gun is used to
store picture pattern. Flood gun is used to maintain picture display on phosphor coated
screen.
2. Phosphor Coated Screen –
In DVST the inner surface of CRT is coated with phosphor crystals is of high persistence that
emit light when beam of electrons strike them.
3. Storage Mesh –
It is thin and high quality wire that is coated with dielectric and is located just behind
phosphor coated screen. Primary gun deposits pattern of positive charge on this grid and it
is transferred to phosphor coated screen by continuous flood of electrons produced by flood
gun. Thus Storage Mesh stores picture to be displayed in form of positive charge
distribution.
4. Collector –
This grid is located just behind storage mesh and purpose of this negatively charged grid is
to smooth out flow of flood electrons.
Working principle of DVST
In DVST similar with CRT electron gun and phosphor coated method is used. But in this no
electron beam is used to directly writing pictures on screen, but instead of this we can used
Storage mesh wire grid is used it is just located behind phosphor coated screen.

Their is also another grid located just behind storage mesh is called Collector and this purpose
is to smooth out flow of flood electrons. The flood gun produce large number of electrons, this
negatively charged grid reduces speed of these electrons.

Then electrons pass through collector at low velocity and attracted by positive charged portions
of storage mesh and strike at portions of phosphor coated screen to display picture. Some
electrons get repelled by other portions of mesh that are negatively charged.

Since the collector has slowly down electrons, in this way they not able to produce sharpened
images. So to reduce this problem, screen itself is maintained at a high positive potential by
means of voltage applied to thin aluminium coating between tube face and phosphor.
Figure – Direct View Storage Tube
Advantages & Disadvantages
(Direct View Storage Tube (DVST))

Advantages Disadvantages
1. For picture display it does not require 1. Not used for dynamic graphic such as
refreshing. animation.
2. Display complex pictures at high 2. These systems do not display colors.
resolution without any flicker. 3. To erase selected part of an image,
3. No use of frame buffer or refresh entire screen needs to be erased and
buffer. modified pictures needs to be
redrawn.
Introduction to Graphic Standards
•Primary goal of standardize graphics software is portability so that it can be used in any hardware
systems & avoid rewriting of software program for different system.
 Some of these standards are discuss below
Graphical Kernel System (GKS)

•This system was adopted as a first graphics software standard by the international standard
organization (ISO) and various national standard organizations including ANSI.
•GKS was originally designed as the two dimensional graphics package and then later extension was
developed for three dimension.

PHIGS (Programmer’s Hierarchical Interactive Graphic Standard)


•PHIGS is extension of GKS. Increased capability for object modeling, color specifications, surface
rendering, and picture manipulation are provided in PHIGS.
•Extension of PHIGS called “PHIGS+” was developed to provide three dimensional surface shading
capabilities not available in PHIGS.
Concepts of various
objects
POINT, LINE, CIRCLE, ELLIPSE AND POLYGONS
Point
The term pixel is a short form of the picture element. It is also called a point or
dot. It is the smallest picture unit accepted by display devices. A picture is
constructed from hundreds of such pixels.

Pixels are generated using commands. Lines, circle, arcs, characters; curves are
drawn with closely spaced pixels. To display the digit or letter matrix of pixels is
used.

The closer the dots or pixels are, the better will be the quality of picture. Closer
the dots are, crisper will be the picture. Picture will not appear jagged and
unclear if pixels are closely spaced. So the quality of the picture is directly
proportional to the density of pixels on the screen.
• The circuitry of the video display device of the computer is capable of converting binary
values (0, 1) into a pixel on and pixel off information. 0 is represented by pixel off. 1 is
represented using pixel on. Using this ability graphics computer represent picture
having discrete dots.

• Pixels are also defined as the smallest addressable unit or element of the screen. Each
pixel can be assigned an address as shown in fig:
Line
Line drawing is accomplished by calculating intermediate positions along the line path
between two specified end points positions. An output device is then directed to fill in
these positions between the end points

A straight line may be defined by two endpoints & an equation. In fig the two endpoints are
described by (x1,y1) and (x2,y2). The equation of the line is used to determine the x, y coordinates
of all the points that lie between these two endpoints.
Circle
Circle is an eight-way symmetric figure. The shape of circle is the same in all quadrants. In each
quadrant, there are two octants. If the calculation of the point of one octant is done, then the
other seven points can be calculated easily by using the concept of eight-way symmetry.
For drawing, circle considers it at the origin.
If a point is P1(x, y), then the other seven
points will be (see figure)

So we will calculate only 45°arc. From which


the whole circle can be determined easily.

If we want to display circle on screen then


the putpixel function is used for eight points
as shown below:

putpixel (x, y, color)


putpixel (x, -y, color)
putpixel (-x, y, color)
putpixel (-x, -y, color)
putpixel (y, x, color)
putpixel (y, -x, color)
putpixel (-y, x, color)
putpixel (-y, -x, color)
Ellipse
An ellipse is an elongated circle. Therefore,
elliptical curves can be generated by
modifying circle-drawing procedures to take
into account the different dimensions of an
ellipse along the major and minor axes.
Polygon
Polygon is a representation of the surface. It is primitive which is closed in nature. It is formed
using a collection of lines. It is also called as many-sided figure. The lines combined to form
polygon are called sides or edges. The lines are obtained by combining two vertices.

Example of Polygon:

•Triangle

•Rectangle

•Hexagon

•Pentagon
Types of Polygons
1.Convex

A polygon is called convex of line joining


any two interior points of the polygon lies
inside the polygon. A non-convex polygon is
said to be concave. A concave polygon has
one interior angle greater than 180°. So
that it can be clipped into similar polygons.
Types of Polygons
2. Concave

A polygon is called convex of line joining


any two interior points of the polygon lies
inside the polygon. A non-convex polygon is
said to be concave. A concave polygon has
one interior angle greater than 180°. So
that it can be clipped into similar polygons.
Polygon Orientation

You might also like