MODULE-2
Vector & Raster Graphics:
Vector Graphics:
Vector graphics are digital images created using mathematical equations (points, lines, curves,
shapes). to represent shapes such as points, lines, curves, and polygons. Unlike pixel-based images,
vector graphics are resolution independent, meaning they can be scaled to any size without losing
clarity or quality. This makes them ideal for designs that require resizing, such as logos, icons, and
illustrations. Each element in a vector image is stored as a separate object, allowing easy editing of
individual components like color, size, and position. Common vector graphic formats include SVG
and AI, and they are widely created using software like Adobe Illustrator and CorelDRAW.
Key Features
Resolution independent (no pixelation)
Scalable to any size without losing quality
Smaller file size (usually)
Editable (objects can be modified individually)
Raster graphics :
Raster graphics are digital images composed of a grid of tiny units called pixels, where each pixel
stores color information. These images are resolution dependent, meaning their quality is directly
tied to the number of pixels they contain; enlarging them beyond their original size causes blurring
or pixelation. Raster graphics are highly suitable for detailed and realistic visuals such as
photographs and digital paintings because they can capture subtle color variations and textures.
However, they typically have larger file sizes and are less flexible for scaling compared to vector
graphics. Common raster formats include JPEG, PNG, and GIF, and they are commonly created or
edited using software like Adobe Photoshop and GIMP.
Key Features
Resolution dependent (quality decreases when zoomed)
Larger file size
Rich in detail and color variations
Not easily scalable
Conversions:
1. Vector to Raster: Printers and display devices are raster devices. As a result, we need to
convert vector images to raster format before they can be used i.e displayed or printed. The
required resolution plays a vital role in determining the size of the raster file generated.
Here it is important to note that the size of the vector image to be converted always remains
the same. It is convenient to convert a vector file to a range of bitmap/raster file formats but
going down the opposite paths is harder. ( because at times we need to edit the image while
converting from raster to vector)
2. Raster to Vector: Image tracing in computing can be referred to as vectorization and it's
simply the conversion of raster images to vector images. An interesting application of
vectorization is to update images and recover work. Vectorization can be used to retrieve
information that we have lost. Paint in Microsoft Windows produces a bitmap output file. It
is easy to notice jagged lines in Paint. In this kind of conversion, the image size reduces
drastically. As a result, an exact conversion is not possible in this scenario. Due to various
approximations and editing that are done in the process of conversion the converted images
are not of good quality.
Graphics Interactive 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.
These Devices include:
1. Keyboard
2. Mouse
3. Trackball
4. Spaceball
5. Joystick
6. Light Pen
7. Digitizer
8. Touch Panels
9. Voice Recognition
10. Image Scanner
1. Keyboard:
The most commonly used input device is a keyboard. The data is entered by pressing
the set of keys. All keys are labeled. A keyboard with 101 keys is called a QWERTY
keyboard.
The keyboard has alphabetic as well as numeric keys. Some special keys are also
available.
1. Numeric Keys: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
2. Alphabetic keys: a to z (lower case), A to Z (upper case)
3. Special Control keys: Ctrl, Shift, Alt
4. Special Symbol Keys: ; , " ? @ ~ ? :
5. Cursor Control Keys: ↑ → ← ↓
6. Function Keys: F1 F2 F3....F9.
7. Numeric Keyboard: It is on the right-hand side of the keyboard and used for fast entry
of numeric data.
Function of Keyboard:
1. Alphanumeric Keyboards are used in CAD. (Computer Aided Drafting)
2. Keyboards are available with special features line screen co-ordinates entry, Menu
selection or graphics functions, etc.
3. Special purpose keyboards are available having buttons, dials, and switches. Dials are
used to enter scalar values. Dials also enter real numbers. Buttons and switches are used
to enter predefined function values.
Advantage:
1. Suitable for entering numeric data.
2. Function keys are a fast and effective method of using commands, with fewer errors.
Disadvantage:
Keyboard is not suitable for graphics input.
2. Mouse:
A Mouse is a pointing device and used to position the pointer on the screen. It is a small
palm size box. There are two or three depression switches on the top. The movement of
the mouse along the x-axis helps in the horizontal movement of the cursor and the
movement along the y-axis helps in the vertical movement of the cursor on the screen.
The mouse cannot be used to enter text. Therefore, they are used in conjunction with a
keyboard.
Advantage:
1. Easy to use
2. Not very expensive
3. Trackball
It is a pointing device. It is similar to a mouse. This is mainly used in notebook or laptop
computer, instead of a mouse. This is a ball which is half inserted, and by changing
fingers on the ball, the pointer can be moved.
Advantage:
1. Trackball is stationary, so it does not require much space to use it.
2. Compact Size
4. Spaceball:
It is similar to trackball, but it can move in six directions where trackball can move in two
directions only. The movement is recorded by the strain gauge. Strain gauge is applied
with pressure. It can be pushed and pulled in various directions. The ball has a diameter
around 7.5 cm. The ball is mounted in the base using rollers. One-third of the ball is an
inside box, the rest is outside.
Applications:
1. It is used for three-dimensional positioning of the object.
2. It is used to select various functions in the field of virtual reality.
3. It is applicable in CAD applications.
4. Animation is also done using spaceball.
5. It is used in the area of simulation and modeling.
5. Joystick:
A Joystick is also a pointing device which is used to change cursor position on a monitor
screen. Joystick is a stick having a spherical ball as its both lower and upper ends as
shown in fig. The lower spherical ball moves in a socket. The joystick can be changed in
all four directions. The function of a joystick is similar to that of the mouse. It is mainly
used in Computer Aided Designing (CAD) and playing computer games.
6. Light Pen
Light Pen (similar to the pen) is a pointing device which is used to select a displayed
menu item or draw pictures on the monitor screen. It consists of a photocell and an
optical system placed in a small tube. When its tip is moved over the monitor screen,
and pen button is pressed, its photocell sensing element detects the screen location and
sends the corresponding signals to the CPU.
Uses:
1. Light Pens can be used as input coordinate positions by providing necessary
arrangements.
2. If background color or intensity, a light pen can be used as a locator.
3. It is used as a standard pick device with many graphics system.
4. It can be used as stroke input devices.
5. It can be used as valuators
[Link]:
The digitizer is an operator input device, which contains a large, smooth board (the
appearance is similar to the mechanical drawing board) & an electronic tracking device,
which can be changed over the surface to follow existing lines. The electronic tracking
device contains a switch for the user to record the desire x & y coordinate positions. The
coordinates can be entered into the computer memory or stored or an off-line storage
medium such as magnetic tape.
Advantages:
1. Drawing can easily be changed.
2. It provides the capability of interactive graphics.
Disadvantages:
1. Costly
2. Suitable only for applications which required high-resolution graphics.
[Link] Panels:
Touch Panels is a type of display screen that has a touch-sensitive transparent panel
covering the screen. A touch screen registers input when a finger or other object comes
in contact with the screen. When the wave signals are interrupted by some contact with
the screen, that located is recorded. Touch screens have long been used in military
applications.
[Link] Systems (Voice Recognition):
Voice Recognition is one of the newest, most complex input techniques used to interact
with the computer. The user inputs data by speaking into a microphone. The simplest
form of voice recognition is a one-word command spoken by one person. Each
command is isolated with pauses between the words.
Voice Recognition is used in some graphics workstations as input devices to accept
voice commands. The voice-system input can be used to initiate graphics operations or
to enter data. These systems operate by matching an input against a predefined
dictionary of words and phrases.
Advantage:
1. More efficient device.
2. Easy to use
3. Unauthorized speakers can be identified
Disadvantages:
1. Very limited vocabulary
2. Voice of different operators can't be distinguished.
[Link] Scanner
It is an input device. The data or text is written on paper. The paper is feeded to scanner.
The paper written information is converted into electronic format; this format is stored
in the computer. The input documents can contain text, handwritten material, picture
extra.
By storing the document in a computer document became safe for longer period of
time. The document will be permanently stored for the future. We can change the
document when we need. The document can be printed when needed.
Scanning can be of the black and white or colored picture. On stored picture 2D or 3D
rotations, scaling and other operations can be applied.
Types of image Scanner:
1. Flat Bed Scanner: It resembles a photocopy machine. It has a glass top on its top.
Glass top in further covered using a lid. The document to be scanned is kept on glass
plate. The light is passed underneath side of glass plate. The light is moved left to right.
The scanning is done the line by line. The process is repeated until the complete line is
scanned. Within 20-25 seconds a document of 4" * 6" can be scanned.
2. Hand Held Scanner: It has a number of LED's (Light Emitting Diodes) the LED's are
arranged in the small case. It is called a Hand held Scanner because it can be kept in
hand which performs scanning. For scanning the scanner is moved over document from
the top towards the bottom. Its light is on, while we move it on document. It is dragged
very slowly over document. If dragging of the scanner over the document is not proper,
the conversion will not correct.
Segmented Graphics
Segmented graphics refers to a method of representing images in which a picture is
divided into smaller, meaningful parts or segments, such as lines, curves, or regions,
rather than being treated as a whole. Each segment represents a distinct object or
portion of the image and can be individually processed, stored, or manipulated. This
approach is commonly used in computer graphics and image processing to simplify
complex images, improve analysis, and enable efficient editing. Segmented graphics are
especially useful in applications like object recognition, medical imaging, and computer
vision, where identifying and working with specific regions of an image is important.
Attribute Table:
An attribute table in computer graphics and Geographical Information Systems (GIS) is a
database-like table that stores non-spatial information associated with geometric
features (such as points, lines, or polygons) in a vector data layer. Each row in the table
represents a specific feature (record), and each column represents a characteristic of that
feature (field or attribute)
Key Components of an Attribute Table:
Record (Row): Represents a single geometric feature (e.g., one specific building).
Field (Column): Represents a specific characteristic or property (e.g., "Building Name" or
"Height").
Unique Identifier (ID): Almost all tables have a system-defined, read-only ID (e.g., Object ID)
that connects the row to the visual shape.
Data Type: Each column is restricted to a specific data type (e.g., text, short/long integer, float,
date)
Example: City Map Layer
Imagine a digital map layer representing various cities. The visual map shows points, but
the attribute table holds the data behind them.
Attribute Table: Cities_Layer
ObjectID City_Name Population (Long) Is_Capital Feature_Type (Text)
(Text) (Text)
1 Kolkata 14,000,000 No City
2 New Delhi 29,000,000 Yes Capital
3 Mumbai 20,000,000 No City
4 Bangalore 12,000,000 No City
In this example:
Records: There are 4 records, meaning 4 distinct city points are drawn on the screen.
Fields: There are 5 fields containing specific information about each city.
Relationship: Selecting Row 2 ("New Delhi") in the table will highlight the
corresponding dot in the "New Delhi" location on the map.
By; Gaurvi shukla (assistant professor ) LPCPS
Display Devices in Computer Graphics
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.
There are some display devices given below:
1. Cathode-Ray Tube(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
1. Cathode-ray Tube (CRT): Here, CRT stands for Cathode ray tube. It is a
technology which is used in traditional computer monitor and television.
Cathode ray tube is a particular type of vacuum tube that displays images when an
electron beam collides on the radiant surface.
Component of CRT
By; Gaurvi shukla (assistant professor ) LPCPS
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.
By; Gaurvi shukla (assistant professor ) LPCPS
Advantages:
1. Real image
2. Many colors to be produced
3. Dark scenes can be pictured
Disadvantages:
1. Less resolution
2. Display picture line by line
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.
By; Gaurvi shukla (assistant professor ) LPCPS
Fig: A Random Scan display draws the lines of an object in a specific order
Advantages:
1. High Resolution
2. Draw smooth line Drawing
Disadvantages:
1. It does only the wireframe.
2. It creates complex scenes due to flicker.
2. Color CRT Monitor: 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: 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.
By; Gaurvi shukla (assistant professor ) LPCPS
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:
1. Better Resolution
2. Half cost
3. Inexpensive
Disadvantages:
1. Only four possible colors
2. Time Consuming
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:
1. It has three phosphorus color dots at each position of the pixel.
First Dot: Red color
By; Gaurvi shukla (assistant professor ) LPCPS
Second Dot: Green color
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.
By; Gaurvi shukla (assistant professor ) LPCPS
Advantages:
1. Display a wider range picture.
2. Display realistic images.
3. In-line arrangement of RGB color.
Disadvantages:
1. Difficult to cover all three beams on the same hole.
2. Poor Resolution.
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:
1. Produce a bright image
2. Energy efficient
3. Completely flat screen
Disadvantages:
1. Fixed aspect ratio & Resolution
2. Lower Contrast
3. More Expensive
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.
By; Gaurvi shukla (assistant professor ) LPCPS
LEDs are powerful in structure, so they are capable of withstanding mechanical
pressure. LED also works at high temperatures.
Advantages:
1. The Intensity of light can be controlled.
2. Low operational Voltage.
3. Capable of handling the high temperature.
Disadvantages:
1. More Power Consuming than LCD.
5. Direct View Storage Tube (DVST): It is used to store the picture information as a
charge distribution behind the phosphor-coated screen.
There are two guns used in DVST:
1. Primary Gun: It is used to store the picture information.
2. Flood / Secondary Gun: It is used to display a picture on the screen.
Advantages:
1. Less Time Consuming
By; Gaurvi shukla (assistant professor ) LPCPS
2. No Refreshing Required
3. High-Resolution
4. Less Cost
Disadvantages:
The specific part of the image cannot be erased.
They do not display color.
6. Plasma Display: It is a type of flat panel display which uses tiny plasma cells. It is
also known as the Gas-Discharge display.
Components of Plasma display
1. Anode: It is used to deliver a positive voltage. It also has the line wires.
2. Cathode: It is used to provide negative voltage to gas cells. It also has fine wires.
3. Gas Plates: These plates work as capacitors. When we pass the voltage, the cell
lights regularly.
4. Fluorescent cells: It contains small pockets of gas liquids when the voltage is
passed to this neon gas. It emits light.
Advantages:
By; Gaurvi shukla (assistant professor ) LPCPS
1. Wall Mounted
2. Slim
3. Wider angle
Disadvantages:
1. Phosphorus loses luminosity over time.
2. It consumes more electricity than LCD.
3. Large Size
7. 3D Display: It is also called stereoscope display technology. This technology is
capable of bringing depth perception to the viewer.
It is used for 3D gaming and 3D TVs.
For Example: Fog Display, Holographic Display, Retina Display Etc.
Advantages:
Impressive Picture Quality
Disadvantage:
Expensive
Binocular Fusion