CG unit 1

Download as pdf or txt
Download as pdf or txt
You are on page 1of 15

COMPUTER GRAPHICS

UNIT- 1
Computer Graphics:
Computer Graphics is the creation of pictures with the help of a computer. The
end product of the computer graphics is a picture it may be a business graph,
drawing, and engineering.
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.

Application of computer graphics:


1. Computer – Aided Design: Generally used in the design of building,
automobiles, aircrafts, textiles and many other products.
2. Presentation Graphics: This is used to produce illustration for or to generate
35-cm slides or trans pare miss for use with projectors.
3. Computer Art: Computer graphics methods are widely used in both fine arts
and Commercial Arts Applications.
4. Entertainment: Computer graphics methods are now commonly used in
making motion pictures, music videos, television shows.
5. Education and Training: Computer generated models of physical, financial,
and economic systems are after used as education aids.
6. Visualization: This is used in connation with data sets related to commerce,
industry and other scientific areas.
7. Image Processing: It applies techniques to modify or inter put existing pictures
such as photographs.
8. Graphical user Interface: It is common now for software packages to provide a
graphical Interface.
Graphical User Interface:
A graphics-based operating system interface that uses icons, menus and a mouse
(to click on the icon or pull down the menus) to manage interaction with the
system.
It is a friendly visual environment that allows the user to perform any action
without having to have programming knowledge. An example of the GUI are the
Windows, MacOs or Android environments, thanks to which commands can be
sent through gestures or mouse movements, without the need to enter any code.

Characteristics of GUI:
 They are much easier to use for beginners.
 Good user interfaces
 be attractive and pleasing to the eye.
 allow the user to try out different options easily.
 be easy to use.
 use suitable colours for key areas.
 use words that are easy to understand aimed at the type of user.
 have help documentation.

Cathode Ray Tube (CRT):


CRT stands for Cathode Ray Tube. CRT is a technology used in traditional
computer monitors and televisions. The image on CRT display is created by firing
electrons from the back of the tube of phosphorus located towards the front of
the screen.
Once the electron heats the phosphorus, they light up, and they are projected on
a screen. The color you view on the screen is produced by a blend of red, blue and
green light.
Components of CRT:
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.
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 Display:


Random Scan System uses an electron beam which operates like a pencil to
create a line image on the CRT screen. The picture is constructed out of a
sequence of straight-line segments.
Each line segment is drawn on the screen by directing the beam to move from
one point on the screen to the next, where its x & y coordinates define each
point. After drawing the picture. The system cycles back to the first line and
design all the lines of the image 30 to 60 time each second.
Random-scan monitors are also known as vector displays or stroke-writing
displays or calligraphic displays.

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:
Random-Scan monitors cannot display realistic shades scenes.

Raster Scan Display:


A Raster Scan Display is based on intensity control of pixels in the form of a
rectangular box called Raster on the screen. Information of on and off pixels is
stored in refresh buffer or Frame buffer. 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.

Types of Scanning or travelling of beam in Raster Scan


1. Interlaced Scanning
2. Non-Interlaced Scanning
In Interlaced scanning, each horizontal line of the screen is traced from top to
bottom. Due to which fading of display of object may occur. This problem can be
solved by Non-Interlaced scanning. In this first of all odd numbered lines are
traced or visited by an electron beam, then in the next circle, even number of
lines are located.
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:
1. Realistic image
2. Million Different colors to be generated
3. Shadow Scenes are possible.

Disadvantages:
1. Low Resolution
2. Expensive

Differentiate between Random and Raster Scan Display:


Random Scan Raster Scan
1. It has high Resolution 1. Its resolution is low.
2. It is more expensive 2. It is less expensive
3. Any modification if needed is easy 3.Modification is tough
4. Solid pattern is tough to fill 4.Solid pattern is easy to fill
5. Refresh rate depends or resolution 5. Refresh rate does not depend on the
picture.
6. Only screen with view on an area is 6. Whole screen is scanned.
displayed.
7. Beam Penetration technology come under 7. Shadow mark technology came under this.
it.
8. It does not use interlacing method. 8. It uses interlacing
9. It is restricted to line drawing applications 9. It is suitable for realistic display.

Color CRT Monitors:


The CRT Monitor display by using a combination of phosphors. The phosphors are
different colors. There are two popular approaches for producing color displays
with a CRT are:

1. Beam Penetration Method:


The Beam-Penetration method has been used with random-scan monitors. In this
method, the CRT screen is coated with two layers of phosphor, red and green and
the displayed color depends on how far the electron beam penetrates the
phosphor layers.
This method produces four colors only, red, green, orange and yellow. A beam of
slow electrons excites the outer red layer only; hence screen shows red color
only. A beam of high-speed electrons excites the inner green layer. Thus screen
shows a green color.
Advantages:
 Inexpensive
Disadvantages:
 Only four colors are possible
 Quality of pictures is not as good as with another method.

2. Shadow-Mask Method:
Shadow Mask Method is commonly used in Raster-Scan System because they
produce a much wider range of colors than the beam-penetration method.
It is used in the majority of color TV sets and monitors.
Construction: A shadow mask CRT has 3 phosphor color dots at each pixel
position.
 One phosphor dot emits: red light
 Another emits: green light
 Third emits: blue light
This type of CRT has 3 electron guns, one for each color dot and a shadow mask
grid just behind the phosphor coated screen.
Shadow mask grid is pierced with small round holes in a triangular pattern.
Working: Triad arrangement of red, green, and blue guns.
The deflection system of the CRT operates on all 3 electron beams
simultaneously; the 3 electron beams are deflected and focused as a group onto
the shadow mask, which contains a sequence of holes aligned with the phosphor-
dot patterns.
When the three beams pass through a hole in the shadow mask, they activate a
dotted triangle, which occurs as a small color spot on the screen.
The phosphor dots in the triangles are organized so that each electron beam can
activate only its corresponding color dot when it passes through the shadow
mask.
Inline arrangement: Another configuration for the 3 electron guns is an Inline
arrangement in which the 3 electron guns and the corresponding red-green-blue
color dots on the screen, are aligned along one scan line rather of in a triangular
pattern.
This inline arrangement of electron guns in easier to keep in alignment and is
commonly used in high-resolution color CRT's.
Advantage:
1. Realistic image
2. Million different colors to be generated
3. Shadow scenes are possible
Disadvantage:
1. Relatively expensive compared with the monochrome CRT.
2. Relatively poor resolution
3. Convergence Problem
Flat Panel Display:
The Flat-Panel display refers to a class of video devices that have reduced volume,
weight and power requirement compare to CRT.
Example: Small T.V. monitor, calculator, pocket video games, laptop computers,
an advertisement board in elevator.
1. Emissive Display: The emissive displays are devices that convert electrical
energy into light. Examples are Plasma Panel, thin film electroluminescent display
and LED (Light Emitting Diodes).
2. Non-Emissive Display: The Non-Emissive displays use optical effects to convert
sunlight or light from some other source into graphics patterns. Examples are LCD
(Liquid Crystal Device).

Plasma Panel Display:


Plasma-Panels are also called as Gas-Discharge Display. It consists of an array of
small lights. Lights are fluorescent in nature. The essential components of the
plasma-panel display are:
1. Cathode: It consists of fine wires. It delivers negative voltage to gas cells. The
voltage is released along with the negative axis.
2. Anode: It also consists of line wires. It delivers positive voltage. The voltage is
supplied along positive axis.
3. Fluorescent cells: It consists of small pockets of gas liquids when the voltage is
applied to this liquid (neon gas) it emits light.
4. Glass Plates: These plates act as capacitors. The voltage will be applied, the
cell will glow continuously.

Advantage:
1. High Resolution
2. Large screen size is also possible.
3. Less Volume
4. Less weight
5. Flicker Free Display
Disadvantage:
1. Poor Resolution
2. Wiring requirement anode and the cathode is complex.
3. Its addressing is also complex.

LCD (Liquid Crystal Display):


Liquid Crystal Displays are the devices that produce a picture by passing polarized
light from the surroundings or from an internal light source through a liquid-
crystal material that transmits the light.
LCD uses the liquid-crystal material between two glass plates; each plate is the
right angle to each other between plates liquid is filled. One glass plate consists of
rows of conductors arranged in vertical direction. Another glass plate is consisting
of a row of conductors arranged in horizontal direction. The pixel position is
determined by the intersection of the vertical & horizontal conductor. This
position is an active part of the screen.
Liquid crystal display is temperature dependent. It is between zero to seventy
degree Celsius. It is flat and requires very little power to operate.

Advantage:
1. Low power consumption.
2. Small Size
3. Low Cost

Disadvantage:
1. LCDs are temperature-dependent (0-70°C)
2. LCDs do not emit light; as a result, the image has very little contrast.
3. LCDs have no color capability.
4. The resolution is not as good as that of a CRT.

Electroluminescent display:
The electroluminescent display or EL display is the most widely used flat type
display technology. Most popular display technologies like laser phosphor & LED
works on the principle of electroluminescence.
When the display is supplied with electrical energy, then semiconductor
generates quantum of energy as well as photons. The result of this display comes
from the recombination of the radioactive of holes and electrons with the electric
charge influence.

Graphics Software:
Graphics software is a type of computer program that is used to create and edit
images.
Common features of graphics software programs include the ability to create,
edit, and save images in a variety of formats.
Some graphics software programs also offer features such as the ability to create
animations or 3D models.
Some of the most popular graphics software programs include Adobe Photoshop,
Corel Painter, and Autodesk Maya.

Advantages:
1. Graphics software provides users with a wide range of tools to create, edit and
manipulate images.
2. It is often easy to use and can be used by people with little or no experience in
image editing.
3. It can be used to create images for a wide range of purposes, including web
design, advertising, and printing.
4. It often provides a wide range of features, making it possible to create
complex images with ease.
5. It is often able to create images in a range of different formats, making it easy
to share images with others.
6. It provides users with a wide range of tools to create, edit, and manipulate
images.
7. It can be used to create both vector and bitmap images.
8. It offers a variety of features and options that allow users to create images
that are both creative and professional.
9. It is often used in conjunction with other software programs, such as word
processors and spreadsheets, to create comprehensive documents and
presentations.

Disadvantages:
1. Many graphics software programs are expensive, and the cost can be a barrier
for some people who want to use them.
2. It requires a lot of memory to store huge files.
3. Some graphics software programs can be complex and difficult to use, which
can be complicated for some users.
4. It requires a powerful computer to work with the project smoothly.
5. It can be time-consuming to create graphics.
6. It can be expensive to purchase the software, and then you also have to pay
for the subscription regularly.
7. It can be difficult to learn how to use the software, especially if you are not
familiar with graphic design.
8. Some graphics software programs only offer limited functionality, which can
be frustrating for users who want to do more with their images.

Graphical Kernel System (GKS)


Graphical Kernel System is software which used for two-dimensional graphics. It
was adopted as first graphics software standard by International Standard
Organization (ISO).
It has features for drawing in 2-dimensional vector graphics which is suitable for
charting and similar purpose. The 2-dimensional computer graphics which is
closely related to six output functions of Graphical Kernel System (GKS). These are
as follows:
1. Polyline: As from the name ‘poly’ means ‘many’. Polyline is function which has
ability to draw one or more straight lines through coordinates` which user has
given to them.
2. Polymarker: This function is used to draw a symbol at coordinate which user
has provided. There are 5 types of symbols which is used by this software
namely: x + * 0.
3. Text: This function is used to add text at given coordinates by user.
4. Fill-area: In this feature, it allows a polygon to be draw and it can be filled with
coordinates which are given. There is variety of fill-area which includes hollow,
solid and there is also variety of hatching and patterns.
5. Cell-array: In this firstly pattern is defined by user and it outputs in rectangle
according to given coordinates by user.
6. Generalized Drawing Primitives: It provides user various kinds of facilities.
Mostly all of systems has various kinds of software for arcs of circle or ellipse
and also drawing of a smooth curve with set of given points.

PHIGS:
(Programmer's Hierarchical Interactive Graphics Standard)
A graphics system and language used to create 2D and 3D images. Like the GKS
standard, PHIGS is a device-independent interface between the application
program and the graphics subsystem.
It manages graphics objects in a hierarchical manner so that a complete assembly
can be specified with all of its subassemblies. It is a very comprehensive standard
requiring high-performance workstations and host processing.

Color Models:
Color model is a 3D color coordinate system to produce all range of color through
the primary color set.
There are millions of colors used in computer graphics. The light displays the
color. A Color model is a hierarchical system in which we can create every color by
using RGB (Red, Green, Blue) and CMYK (Cyan, Magenta, Yellow, Black) models.
We can use different colors for various purposes.
The total number of colors displayed by the monitor depends on the storage
capacity of the video controller card.

Types of Color Models:


1. RGB (Red, Green, Blue):
The RGB color model is the most common color model used in Digital image
processing and OpenCV. The color image consists of 3 channels. One channel each
for one color. Red, Green and Blue are the main color components of this model.
All other colours are produced by the proportional ratio of these three colours
only. 0 represents the black and as the value increases the color intensity
increases.
Properties:
 This is an additive color model. The colours are added to the black.
 3 main channels: Red, Green and Blue.
 Used in DIP, OpenCV and online logos.
Color combination:
Green(255) + Red(255) = Yellow
Green(255) + Blue(255) = Cyan
Red(255) + Blue(255) = Magenta
Red (255) + Green (255) + Blue (255) = White

2. CMYK (Cyan, Magenta, Yellow and Black):


CMYK color model is widely used in printers. It is a subtractive color model. 0
represents the primary color and 1 represents the lightest color. In this model,
point (1, 1, 1) represents black, and (0,0,0) represents white. It is a subtractive
model thus the value is subtracted from 1 to vary from least intense to a most
intense color value.
1-RGB = CMY
Cyan is negative of Red.
Magenta is negative of Green.
Yellow is negative of Blue.
3. HSV (Hue Saturation Value):
The image consists of three channels. Hue, Saturation and Value are three
channels. This color model does not use primary colours directly. It uses color in
the way humans perceive them. HSV color when is represented by a cone.
Hue is a color component. Since the cone represents the HSV model, the hue
represents different colours in different angle ranges.
Red color falls between 0 and 60 degrees in the HSV cone.
Yellow color falls between 61 and 120 degrees in the HSV cone.
Green color falls between 121 and 180 degrees in the HSV cone.
Cyan color falls between 181 and 240 degrees in the HSV cone.
Blue color falls between 241 and 300 degrees in the HSV cone.
Magenta color falls between 301 and 360 degrees in the HSV cone.

4. Look-Up Table:
Image representation is essentially the description of pixel colors. There are three
primary colors: R (red), G (green) and B (blue). Each primary color can take on
intensity levels produces a variety of colors.
Using direct coding, we may allocate 3 bits for each pixel, with one bit for each
primary color. The 3-bit representation allows each primary to vary independently
between two intensity levels: 0 (off) or 1 (on). Hence each pixel can take on one
of the eight colors.
Bit 1:r Bit 2:g Bit 3:b Color name
0 0 0 Black
0 0 1 Blue
0 1 0 Green
0 1 1 Cyan
1 0 0 Red
1 0 1 Magenta
1 1 0 Yellow
1 1 1 White

Lookup Table approach reduces the storage requirement. In this approach pixel
values do not code colors directly. Alternatively, they are addresses or indices into
a table of color values. The color of a particular pixel is determined by the color
value in the table entry that the value of the pixel references.

5. Color Map Tables:


A color mapping table consists of a base part, a set of source groups, and a set of
target groups. The base part identifies the color mapping table with a type of
reset or normal.
The simplest possible color mapping table is a reset color mapping table, which
tells the printer to do no transformations on the color information found in the
document. A reset color mapping table has no source or target groups; all other
color mapping tables have at least one source and one target group.

You might also like