Unit-1 Overview of Computer Graphics (E-Next - In)
Unit-1 Overview of Computer Graphics (E-Next - In)
Tirup Parmar
UNIT I
Overview of Computer Graphics
What are Computer Graphics?
Today there are very few aspects of our lives not affected by computers. Practically every cash
or monetary transaction that takes place daily involves a computer. In many cases, the same is
true of computer graphics. Whether you see them on television, in newspapers, in weather
reports or while at the doctor’s surgery, computer images are all around you.
“A picture is worth a thousand words” is a well-known saying and highlights the advantages and
benefits of the visual presentation of our data. We are able to obtain a comprehensive overall
view of our data and also study features and areas of particular interest.
A well-chosen graph is able to transform a complex table of numbers into meaningful results.
Such graphs are used to illustrate papers, reports and theses, as well as providing the basis for
presentation material in the form of slides and overhead transparencies.
Computer graphics are pictures and movies created using computers - usually referring to image data
created by a computer specifically with help from specialized graphical hardware and software. It is a vast
and recent area in computer science. The phrase was coined by computer graphics researchers Verne
Hudson and William Fetter of Boeing in 1960. Another name for the field is computer-generated imagery,
or simply CGI
Computer graphics are visual representations of data displayed on a monitor made on a computer.
Computer graphics can be a series of images (most often called video) or a single image.
https://E-next.in
Prof. Tirup Parmar
Computer graphics are very useful. Computer-generated imagery is used for movie making, video game
and computer program development, scientific modeling, and design for catalogs and other commercial
art. Some people even make computer graphics as art.
Computer graphics can be 2D or 3D. They are made differently and used differently. People use
different computer programs to make different types of graphics
2D graphics
2D computer graphics are usually split into two categories: vector graphics and raster graphics.
https://E-next.in
Prof. Tirup Parmar
Are you new to the world of graphic design? Don’t worry, we’ve been there. Let’s start with the
basics. To start, there are two categories of graphics you should know about: vector graphics and
raster (or bitmap) graphics.
Vector graphics use mathematical equations to draw out your designs. These mathematical
equations are translated into points that are connected by either lines or curves, also known as
vector paths, and they make up all the different shapes you see in a vector graphic.
This allows vector graphics to be scaled to any size without sacrificing image quality as well as
maintain a small file size. Common vector file formats are .svg, .cgm, .odg, .eps, and .xml.
https://E-next.in
Prof. Tirup Parmar
https://E-next.in
Prof. Tirup Parmar
Raster (or bitmap) graphics are made up of tiny squares called pixels. Once a raster
graphic is created at a certain size (i.e. a fixed number of pixels), it can’t be scaled up without
losing image quality. The larger the amount of pixels in an image, the larger the file size – they
are positively correlated since the computer needs to store information on every single pixel.
Widely used raster file formats are .jpg, .png, .gif, .bmp, and .tiff.
Raster graphic editors are optimal for digital photograph editing because raster graphics are able
to portray better color depth. Each pixel can be any one of the 16 million different colors
available. But if you’re not working with digital photographs, Vector graphics editors would be
your best bet for all other types of design editing, especially because vector graphics are able to
be scaled and manipulated at any size with clarity.
It’s also important to take file size into consideration. If a smaller file size is what you’re looking
for, stick with vector graphics. Raster image files can be quite large.since the computer needs to
remember information about every single pixel. Choosing a graphic type depends on what type
of design you’re creating.
Video Lectures @ https://www.youtube.com/TirupParmar & Notes @ https://t.me/bscit Page 7
https://E-next.in
Prof. Tirup Parmar
Realistic The capability of this system to store These systems are designed for line-
Display intensity values for pixel makes it well drawing and can’t display realistic
suited for the realistic display of scenes shaded scenes.
contain shadow and color pattern.
Draw an Image Screen points/pixels are used to draw an Mathematical functions are used to
image. draw an image.
Cost It is less expensive than Random Scan It is Costlier than Raster Scan System.
System.
Line Drawing Zig – Zag line is produced because Smooth line is produced because
plotted value are discrete. directly the line path is followed by
electron beam
Refresh Rate Refresh rate is 60 to 80 frame per second. Refresh Rate depends on the number
of lines to be displayed i.e 30 to 60
times per second.
https://E-next.in
Prof. Tirup Parmar
3D graphics
3D graphics are graphics that look like objects because they are three-dimensional. This means the
computer thinks it has a height, a length, and a depth, and displays them as this. Some programs used to
make 3D graphics are Bryce, 3D Studio Max, Maya and Blender, and 3D graphics are used many times in
movies and TV shows and video games.
Pixel: Short for Picture Element, a pixel is a single point in a graphic image. Graphics monitors display
pictures by dividing the display screen into thousands (or millions) of pixels, arranged in rows and
columns. The pixels are so close together that they appear connected.
The number of bits used to represent each pixel determines how many colors or shades of gray
can be displayed. For example, in 8-bit color mode, the color monitor uses 8 bits for each pixel, making it
possible to display 2 to the 8th power (256) different colors or shades of gray.
Persistence: The major difference between phosphors is their persistence. It decides how long they
continue to emit light after the electron beam is removed. Persistence is defined as the time it takes the
emitted light from the screen to decay to one-tenth of its original intensity. Lower persistence phosphors
require higher refreshing rates to maintain a picture on the screen without flicker. However it is useful for
displaying animations. On the other hand higher persistence phosphors are useful for displaying static and
highly complex pictures
Resolution: For graphics monitors, the screen resolution signifies the number of dots (pixels) on the
entire screen, expressed in terms of the number of pixels on the horizontal axis and the number on the
vertical axis. Some common resolutions are:
Aspect Ratio: The aspect ratio of a geometric shape is the ratio of its sizes in different dimensions.
For example, the aspect ratio of a rectangle is the ratio of its longer side to its shorter side - the ratio of
width to height when the rectangle is oriented as a "landscape".
The aspect ratio is expressed as two numbers separated by a colon ( x : y ). The values x and y do
not represent actual width and height but, rather, the "relation" between width and height. As an example,
8:5, 16:10 and 1.6:1 are the same aspect ratio. An aspect ratio of 4:5 means that a vertical line plotted
with four points has the same length as a horizontal line plotted with five points
https://E-next.in
Prof. Tirup Parmar
Presentation Graphics
To produce illustrations which summarize various kinds of data. Except 2D, 3D graphics
are good tools for reporting more complex data.
Computer Art
Painting packages are available. With cordless, pressure-sensitive stylus, artists can
produce electronic paintings which simulate different brush strokes, brush widths, and
colors. Photorealistic techniques, morphing and animations are very useful in commercial
art. For films, 24 frames per second are required. For video monitor, 30 frames per
second are required.
Entertainment
Motion pictures, Music videos, and TV shows, Computer games
Visualization
For analyzing scientific, engineering, medical and business data or behavior. Converting
data to visual form can help to understand mass volume of data very efficiently.
Image Processing
Image processing is to apply techniques to modify or interpret existing pictures. It is
widely used in medical applications.
https://E-next.in
Prof. Tirup Parmar
Photoshop
Illustrator
Paint Shop Pro
CorelDRAW
The Apple Photos plugins from Macphun
Adobe Lightroom
Digital Image Suite
Canva
Picasa
and many more.
3D Modeling and CAD (computer-aided design) software is also graphics software, but these are
very specialized applications which are best covered under the respective topics for the industries
in which they are used. For example, 3D graphics software is often used in animation, and CAD
software is often used in architecture and engineering.
Motion graphics have their own unique qualities, and though we do touch on this kind of
graphics software on this site, it is covered in more detail in the About.comAnimation and
Desktop Video topics. Then again, you will be surprised to discover a lot of graphics
applications are able to do just that.
Another software category that we cover is graphics software you can use on your smartphone or
tablet.
Inspiration can hit anywhere, at any time. Thus your smartphone or tablet can be used to modify
a photo you have just taken, wireframe a web site you are working on, sketch out an idea you
have or anything else that heeds the call of your creative muse. best of all these mobile apps let
you answer the call anywhere from your local coffee shop to a picnic table in a local park.
There is a lot of software that some people think of as graphics software because you use it to
work with graphics, but technically it is not because you don't use it for directly manipulating
images. Here are some examples of software that people think of as graphics software, but aren't
covered on this site:
There are two main categories of graphics software and many smaller categories of specialized
tools. The two main categories are pixel-based image editors, and vector-based image editors.
https://E-next.in
Prof. Tirup Parmar
Graphics software is used in many facets of life and business. Some of the common things
people use graphics software for include: editing and sharing digital photos, creating logos,
drawing and modifying clip art, creating digital fine art, creating Web graphics, designing
advertisements and product packaging, touching up scanned photos, and drawing maps or other
diagrams.
There are the unconventional uses as well such as editing video in Photoshop or 3D drawing in
Illustrator. As well a whole new class of software is emerging. It is prototyping software where
graphic designers create the design and interactive prototypes for apps or web pages that will be
destined for smartphones ,tablets and desktops. We look at all of that as well.
In fact practically everything you see on paper or a screen has been touched by Graphics
Software.
Since you have arrived on this site, you may have something in mind that you want to do using
graphics software.We have a rather extensive list o techniques, tips and tutorials showing you
how to it. Head on over to the Find Software category for lots of resources to help you find the
best graphics software to fit your needs and budget.
3DStudio Max
The successor to 3DStudio 3.0. 3DStudio Max runs under WindowsNT. It is entirely object
oriented, featuring new improvments such as volumetric lighting, spacewarps, and an all new
redesigned inteface.
3DStudio
3DStudio is a 3D computer graphics program. 3DStudio runs on PC's. It is relativly easy to use.
Many schools and small time production studios use 3DStudio to satisfy their needs. 3DStudio is
created by AutoDesk. 3DStudio consists of a 2D modeler in which shapes can be drawn, a 3D
Lofter, in which 2D shapes can be extruded, twisted, or solidified to created 3D objects. Then
there is a 3D modelet in which a scene is created. Finally there is a animator in which key frames
https://E-next.in
Prof. Tirup Parmar
are assigned to create an animation and a material editor in which a great veriety of textures can
be created. Overall this is a great program.
LightWave3D
Adobe Photoshop
Although Adobe Photoshop is not a computer animation application, it is one of the top of the
line graphics programs. It is created by Adobe. Photoshop runs both on Mac's and PC Windows,
and even on SGI's. It can be used to touch up digitized images or to create graphics from scratch.
Adobe Premiere
Adobe Premier, just like the name says, is created by Adobe. It is a tool used to composite
digitized video, stills, and apply a veriety of transitions and special effects. Adobe Premiere runs
both on Macintoshes and PC Windows.
Animator Studio
Animator Studio is a cell animation program from AutoDesk. It's predecessor was Animator Pro
for PC DOS. Animator Studio runs under Windows. It has a multitude of features that minimize
the animation creation time.
The most common place for a plot to be “sent” is the screen device
On a Mac the screen device is launched with the quartz()
On Windows the screen device is launched with windows()
On Unix/Linux the screen device is launched with x11()
https://E-next.in
Prof. Tirup Parmar
When making a plot, you need to consider how the plot will be used to determine what device
the plot should be sent to
Data output through graphic devices on computer systems is made possible through
techniques that use video generation modules to display images. This differs from text mode
output, for which the computer generates horizontal lines of alphanumeric symbols. Although
the technical requirements of both systems overlap, graphic devices use an approach that
assumes that every dot on the screen is separately accessible. By contrast, in text mode, the
smallest screen element is actually a group of points that together all define a character—a letter,
a numeral, or a punctuation mark.
Graphic devices are output devices, but their physical characteristics restrict them from
taking data as represented in the computer's memory and displaying the data directly. Instead,
they require the assistance of a special device to translate data into electrical signals that are
compatible with the display hardware. These devices are called graphics controllers.
One way that data can be formulated for display by the computer is through a technique
known as a bitmapped display or "raster-scan display." Using this approach, the computer
contains an area of memory that holds all the data that are to be displayed. The central processor
writes data into this region of memory and the video controller collects them from there. The bits
of data stored in this block of memory are related to the eventual pattern of pixels that will be
used to construct an image on the display.
https://E-next.in
Prof. Tirup Parmar
https://E-next.in
Prof. Tirup Parmar
https://E-next.in
Prof. Tirup Parmar
Interaction takes place at the interface (dotted line in Figure 1) through an output channel--
displays stimulating human senses--and the input channel.
Paddle Control
• Simplest of the analog input
devices.
• The paddle control varies its
resistance, thereby changing the
voltage of the input circuit in
relation to the movement of the
paddle’s control knob.
• Commonly, two paddle controls
are used in graphics system, one to
control movement in the x-direction
and one to control movement in the
y-direction.
Figure: Paddle Control
https://E-next.in
Prof. Tirup Parmar
Trackball
• Trackball is normally operated by rolling the ball with the palm of the hand.
• It mechanically combines two variable resistors in a single device, thus allowing the user to use
one hand to enter both x and y information with a single device.
Figure: Trackball
Mouse
• The mouse, like trackball, combines two variable resistors in a single device.
• Wheels or rollers on the bottom of the mouse can be used to record the amount and direction of
movement. Another method for detecting mouse motion is with an optical sensor.
• One, two or three buttons are usually included on the top of the mouse for signaling the
execution of some operation, such as recording cursor position or invoking a function.
Figure: Mouse
https://E-next.in
Prof. Tirup Parmar
Joystick
Figure: Joystick
Light Pen
• Light pens are used to select screen positions by detecting the light coming from the points on
the CRT screen.
• They are sensitive to the short burst of light emitted from the phosphor coating at the instant the
electron beam strikes a particular point.
• The recorded light-pen coordinates can be used to position an object or to select a processing
option.
https://E-next.in
Prof. Tirup Parmar
Touch Panel
• Touch panels allow displayed objects or screen positions to be selected with the touch of a
finger.
https://E-next.in
Prof. Tirup Parmar
• Optical touch panels make use of a series of infrared light-emitting diodes (LEDs) and sensors
located around the perimeter of the display.
• When the user touches the screen, light beams are broken, indicating the location of the user’s
finger.
Keyboard
https://E-next.in
Prof. Tirup Parmar
• The keyboard is an efficient device for inputting nongraphic data as picture levels associated
with a graphic display.
• Keyboards can also be provided with features to facilitate entry of screen coordinates, menu
selections, or graphic functions.
• Function keys allow users to enter frequently used operations in a single keystroke, and
cursorcontrol keys can be used to select displayed objects or coordinate positions by positioning
the screen cursor.
Digitizers
• A common device for interactively selecting
coordinate positions on a object is a digitizer.
• These discrete coordinate positions can be
joined with straight-line segments to
approximate the curve or surface shapes.
• Graphic tablets provide a highly accurate
method for selecting coordinate positions with
accuracy of about 0.05 mm.
• Many graphic tablets are constructed with a
rectangular grid of wires embedded in the tablet
surface.
• Electromagnetic pulses are generated in
sequence along the wires, and an electric signal
is induced in a wire coil in an activated stylus or
hand cursor to record a tablet position.
Figure: Digitizer
https://E-next.in
Prof. Tirup Parmar
Image Scanners
• An image scanner records the
gradations of gray scale/color
of a given color or b/w photos
and stores in an array.
• On stores image, we can
apply transformations to
rotate, scale, crop the picture
to a particular screen area.
• We can also apply various
image processing methods to
modify the array
representation of the picture
(e.g. contrast enhancement).
Figure: DataGlove
https://E-next.in
Prof. Tirup Parmar
An input device is any device that sends data from an outside source into a processing system
such as a computer or television. A video input device is any device that sends video. There are
several types of video input devices that allow you to play video from an external device on a
video display.
Media Players
Media players are devices that play any sort of media. These include physical media players such
as VCRs, DVD players and Blu-ray players, as well as digital media players such as DVRs and
streaming video players such as the Roku Netflix player and other Netflix-supported devices.
https://E-next.in
Prof. Tirup Parmar
Satellite/Cable Receivers
Satellite and cable receivers are set-top boxes (STB) that allow you to receive a decrypted video
signal from your satellite or cable service provider. This allows you to receive broadcast TV and
subscription channels as well as optional services such as video on-demand and DVR recordings.
Digital Cameras
Digital cameras can also function as video input devices. Most digital cameras, including still
cameras and video cameras, include video output ports such as composite or HDMI ports; these
ports allow you to connect the camera to a TV to view the photos and videos form the camera.
Digital cameras can also be connected to a computer to transfer photos and videos.
https://E-next.in
Prof. Tirup Parmar
commands. He can give a series of commands, each one generating a graphical response from the
computer. In this way he maintains a conversation, or dialogue, with the computer.
Interactive computer graphics affects our lives in a number of indirect ways. For example, it helps
to train the pilots of our airplanes. We can create a flight simulator which may help the pilots to
get trained not in a real aircraft but on the grounds at the control of the flight simulator. The flight
simulator is a mock up of an aircraft flight deck, containing all the usual controls and surrounded
by screens on which we have the projected computer generated views of the terrain visible on take
off and landing.
Flight simulators have many advantages over the real aircrafts for training purposes, including fuel
savings, safety, and the ability to familiarize the trainee with a large number of the world’s airports.
Non Interactive Computer Graphics: In non interactive computer graphics otherwise
known as passive 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.
Passive Active
Control No control Dynamic nature
Communication One Way Communication 2-Way Communication
Interaction No Interaction b/w User and H/W High bandwidth user interaction
Display Technologies
A display is a computer output surface and projecting mechanism that shows text and often
graphic images to the computer user, using a cathode ray tube ( CRT ), liquid crystal display
( LCD ), light-emitting diode, gas plasma, or other image projection technology. The display is
usually considered to include the screen or projection surface and the device that produces the
information on the screen. In some computers, the display is packaged in a separate unit called
a monitor . In other computers, the display is integrated into a unit with the processor and other
parts of the computer. (Some sources make the distinction that the monitor includes other signal-
handling devices that feed and control the display or projection device. However, this distinction
disappears when all these parts become integrated into a total unit, as in the case of notebook
computers.) Displays (and monitors) are also sometimes called video display terminals (VDTs) .
The terms display and monitor are often used interchangably.
Most computer displays use analog signals as input to the display image creation mechanism.
This requirement and the need to continually refresh the display image mean that the computer
also needs a display or video adapter. The video adapter takes the digital data sent by application
https://E-next.in
Prof. Tirup Parmar
programs, stores it in video random access memory ( video RAM ), and converts it to analog
data for the display scanning mechanism using an digital-to-analog converter ( DAC ).
Random-scan displays are designed to draw all the component lines of a picture 30 to 60 times
each second.
https://E-next.in
Prof. Tirup Parmar
Fig.1 Fig. 2
Fig. 3
https://E-next.in
Prof. Tirup Parmar
The primary components of an electron gun in a CRT are the heated metal cathode and a
control grid
Heat is supplied to the cathode by directing a current through a coil of wire, called the
filament, inside the cylindrical cathode structure. This causes electrons to be boiled off"
the hot cathode surface. In the vacuum inside the CRT envelope, the free, negatively
charged electrons are then accelerated toward the phosphor coating by a high positive
voltage. The accelerating voltage can be generated with a positively charged metal
coating on the inside of the CRT envelope near the phosphor screen, or an accelerating
anode can be used, as in Fig.3.
Sometimes the electron gun is built to contain the accelerating anode and focusing system
within the same unit. Intensity of the electron beam is controlled by setting voltage levels
on the control grid, which is a metal cylinder that fits over the cathode. A high negative
voltage applied to the control grid will shut OFF the beam by repelling electrons and
stopping them from passing through the small hole at the end of the control grid structure.
A smaller negative voltage on the control grid simply decreases the number of electrons
passing through. Since the amount of light emitted by the phosphor coating depends on
the number of electrons striking the screen,
The focusing system in a CRT is needed to force the electron beam to converge into a
small spot as it strikes the phosphor. Otherwise, the electrons would repel each other, and
the beam would spread out as it approaches the screen. Focusing is accomplished with
either electric or magnetic fields.
The distance that the electron beam must travel to different points on the screen varies
because the radius of curvature for most CRTs is greater than the distance from the
focusing system to the screen center. Therefore, the electron beam will be focused
properly only at the center to the screen.
As the beam moves to the outer edges of the screen, displayed images become blurred.
To compensate for this, the system can adjust the focusing according to the screen
position of the beam.
As with focusing, deflection of the electron beam can be controlled either with electric
fields or with magnetic fields.
Magnetic deflection has two pairs of coils are used, with the coils in each pair mounted
on opposite sides of the neck of the CRT envelope. One pair is mounted on the top and
bottom of the neck and the other pair is mounted on opposite sides of the neck. The
magnetic, field produced by each pair of coils results in a transverse deflection force that
is perpendicular both to the direction of the magnetic field and to the direction of travel of
the electron beam. Horizontal deflection is accomplished with one pair of coils, and
vertical deflection by the other pair. The proper deflection amounts are attained by
adjusting the current through the coils.
Electrostatic deflection has two pairs of parallel plates are mounted inside the CRT
envelope. One pair coil plates is mounted horizontally to control the vertical deflection,
and the other pair is mounted vertically to control horizontal deflection (Fig. 3). Spots of
light are produced on the screen by the transfer of the CRT beam energy to the phosphor.
When the electrons in the beam collide with the phosphor coating, they are stopped and
then kinetic energy is absorbed by the phosphor. Part of the beam energy is converted by
friction into heat energy, and the remainder causes electrons in the phosphor atoms to
move up to higher quantum-energy levels. After a short time, the "excited phosphor
https://E-next.in
Prof. Tirup Parmar
electrons begin dropping back to their stable ground state, giving up their extra energy as
small quantum’s of Light energy. The frequency (or color) of the light emitted by the
phosphor is proportional to the energy difference between the excited quantum state and
the ground state. Different kinds of phosphors are available for use in a CRT.
Besides color, a major difference between phosphors is their persistence.
Persistence: How long they continue to emit light (that is, have excited electrons
returning to the ground state) after the CRT beam is removed.
Persistence is defined as “the time it takes the emitted light from the screen to decay
to one- tenth of its original intensity”.
Lower persistence phosphors require higher refresh rates to maintain a picture on
the screen without flicker. It is useful for animation
High-persistence phosphor is useful for displaying highly complex, static
pictures. Although some phosphors have persistence greater than 1 second, graphics
monitors are usually constructed with persistence in the range from 10 to 60
microseconds.
Resolution: The maximum number of points that can be displayed without overlap on a
CRT is referred to as the resolution.
Resolution is the number of points per centimeter that can be plotted horizontally and
vertically, although it is often simply stated as the total number of points in each direction.
Spot intensity has a Gaussian distribution, so two adjacent spots will appear distinct as
long as their separation is greater than the diameter at which each spot has an intensity of
about 60 percent of that at the center of the spot.
Typical resolution on high-quality systems is 1280 by 1024, with higher resolutions
available on many systems. High resolution systems are often referred to as high-definition
systems. The physical size of a graphics monitor is given as the length of the screen diagonal,
with sizes varying from about 12 inches to 27 inches or more.
Aspect Ratio: This number gives the ratio of vertical points to horizontal points
necessary to produce equal-length lines in both directions on the screen. (Sometimes
aspect ratio is stated in terms of the ratio of horizontal to vertical points.) An aspect ratio
of 3/4 means that a vertical line plotted with three points has the same length as a
horizontal line plotted with four points.
RASTER-SCAN DISPLAYS
The most common type of graphics monitor employing a CRT is the raster-scan display, based
on television technology.
https://E-next.in
Prof. Tirup Parmar
In a raster-scan system, “the electron beam is swept across the screen, one row at a time from
top to bottom”. As the electron beam moves across each row, the beam intensity is turned on
and off to create a pattern of illuminated spots.
Fig. 4 Fig. 5
Picture definition is stored in a memory area called the refresh buffer or frame buffer.
This memory area holds the set of intensity values for all the screen points. Stored
intensity values are then retrieved from the refresh buffer and "painted" on the screen one
row (scan line) at a time Fig.
PIXEL: Each screen point is referred to as a pixel or pel (shortened forms of picture
element).
The capability of a raster-scan system to store intensity information for each screen point
makes it well suited for the realistic display of scenes containing subtle shading and color
patterns.
Eg: Home Television sets and Printers.
Intensity range for pixel positions depends on the capability of the raster system.
In a simple black-and-white system, each screen point is either on or off, so only one bit
per pixel is needed to control the intensity of screen positions.
For a bit level system,
A bit value of 1 indicates that the electron beam is to be turn ON at that position.
A bit value of 0 indicates that the beam intensity is to be turn OFF.
Additional bits are needed when color and intensity variations can be displayed.
Up to 24 bits per pixel are included in high-quality systems, which can require several
megabytes of storage for the frame buffer, depending on the resolution of the system.
A system with 24 bits per pixel and a screen resolution of 1024 bv 1024 requires 3
Mega Bytes of storage for the frame buffer.
https://E-next.in
Prof. Tirup Parmar
Bitmap: On a black-and-white system with one bit per pixel, the frame buffer is
commonly called a Bitmap.
Pixmap: Systems with multiple bits per pixel, the frame buffer are often referred to as a
Pixmap.
Refreshing on raster-scan displays is carried out at the rate of 60 to 80 frames per
second, although some systems are designed for higher refresh rates. Sometimes, refresh
rates are described in units of cycles per second, or Hertz (Hz), where a cycle
corresponds to one frame.
A refresh rate of 60 frames per second as simply 60 cycle per second or 60 Hz.
At the end of each scan line, the electron beam returns to the left side of the screen to
begin displacing the next scan line.
Horizontal Retrace: The return to the left of the screen, after refreshing each
scan line, is called the horizontal retrace of the electron beam.
Vertical Retrace: At the end of each frame (displayed in 1/80th to 1/60th of a
second), the electron beam returns (vertical retrace) to the top left comer of the screen to
begin the next frame.
On some raster-scan systems (and in TV sets), each frame is displayed in two passes
using an interlaced refresh procedure. In the first pass, the beam sweeps across every
other scan line from top to bottom. Then after the vertical retrace, the beam sweeps out
the remaining scan lines (Fig. 6).
Interlacing: Interlacing of the scan lines in this way allows us to see” the entire screen
displayed in one-half the time” it would have taken to sweep across all the lines at once
from top to bottom. Interlacing is primarily used with slower refreshing rates.
On an older, 30 frame per-second, non-interlaced display, for instance, some flicker is
noticeable. But with interlacing, each of the two passes can be accomplished in 1/60th of a
second, which brings the refresh rate nearer to 60 frames per second.
This is an effective technique for avoiding flicker, providing that adjacent scan lines
contain similar display information.
https://E-next.in
Prof. Tirup Parmar
Random-Scan Displays
When operated as a random-scan display unit, a CRT has “the electron beam directed only to
the parts of the screen where a picture is to be drawn”.
Random scan monitors draw a picture one line at a time and for this reason are also referred to
as vector displays (or stroke-writing or calligraphic displays).
The component lines of a picture can be drawn and refreshed by a random-scan system in
any specified order (Fig.). A pen plotter operates in a similar way and is an example of a
random-scan, hard-copy device.
Refresh rate on a random-scan system depends on the number of lines to be displayed.
Picture definition is now stored as a set of line drawing commands in an area of memory
r e f e d to as the refresh display file.
https://E-next.in
Prof. Tirup Parmar
Sometimes the refresh display file is called the display list, display program, or
simply the refresh buffer.
To display a specified picture, the system cycles through the set of commands in the
display file, drawing each component line in turn. After all line drawing commands have
been processed, the system cycles back to the first line command in the list.
Random-scan displays are designed to draw all the component lines of a picture 30 to 60
times each second.
High quality vector systems are capable of handling approximately 100,000 "short" lines
at this refresh rate. When a small set of lines is to be displayed, each refresh cycle is
delayed to avoid refresh rates greater than 60 frames per second. Otherwise, faster
refreshing is the set of lines could burn out the phosphor.
Random-scan systems are designed for line drawing applications and cannot display
realistic shaded scenes. Since picture definition is stored as a set of line drawing
instructions and not as a set of intensity values for all screen points, vector displays
generally have higher resolution than raster systems.
Also, vector displays produce smooth line drawings because the CRT beam directly
follows the line path.
A raster system, in contrast, produces jagged lines that are plotted as discrete end point
sets.
Advantage: Beam penetration has been an inexpensive way to produce color in random-scan
monitors,
Disadvantage: only four colors are possible, and the quality of pictures is not as good as with
other methods.
https://E-next.in
Prof. Tirup Parmar
2. SHADOW-MASK METHODS
Shadow-mask methods are commonly used in raster scan systems (including color TV)
because they produce a much wider range of colors than the beam penetration method.
A shadow-mask CRT has three phosphor color dots at each pixel position.
One phosphor dot emits a RED Light, another emits a GREEN light, and the third emits
a BLUE light.
This type of CRT has three electron guns, one for each color dot, and a shadow-mask grid
just behind the phosphor-coated screen.
2.In-Line arrangement in which the three electron guns, and the corresponding red-
green-blue color dots on the screen, are aligned along one scan line instead of in a triangular
pattern. This in-line arrangement of electron guns is easier to keep in alignment and is
commonly used I n high-resolution color CRTs.
https://E-next.in
Prof. Tirup Parmar
The color variations in a shadow-mask CRT by varying the intensity levels of the three
electron beams.
By turning OFF the RED and GREEN guns, gets the color coming from the BLUE
phosphor.
Other combinations of beam intensities produce a small light spot for each pixel position,
since our eyes tend to merge the three colors into one composite.
The color depends on the amount of excitation of the red, green, and blue phosphors.
White (or gray) area is the result of activating all three dots with equal intensity.
Yellow is produced with the green and red dots only.
Magenta is produced with the blue and red dots.
Cyan shows up when blue and green are activated equally.
In some low-cost systems, the electron beam can only be set to on or off, limiting
displays to Eight Colors.
https://E-next.in
Prof. Tirup Parmar
More sophisticated systems can set intermediate intensity levels for the electron beams,
allowing several million different colors to be generated.
Color graphics systems can be designed to be used with several types of CRT display
devices. Some inexpensive home-computer systems and video games are designed for
use with a color TV set and an RF (radio-frequency) modulator.
The purpose of the RF modulator is to simulate the signal from a broadcast TV station.
This means that the color and intensity information of the picture must be combined and
superimposed on the broadcast-frequency carrier signal that the TV needs to have as
input. The RF modulator and TV circuitry decreases the quality of displayed images.
These monitors use shadow-mask methods and take the intensity level for each electron
gun (red, green, and blue) directly from the computer system without any intermediate
processing.
High-quality raster-graphics systems have 24 bits per pixel in the frame buffer, allowing
256 voltage settings for each electron gun and nearly 17 million color choices for each
pixel.
An RGB color system with 24 bits of storage per pixel is generally referred to as a Full-
Color System or a True-Color System.
A DVST monitor has both disadvantages and advantages compared to the refresh CRT.
Advantages
1. Because no refreshing is needed.
2. Very complex pictures can be displayed at very high resolutions without flicker.
Disadvantages
1. DVST systems are that they ordinarily do not display color and that selected parts of a picture
cannot he erased.
2. To eliminate a picture section, the entire screen must be erased and the modified picture
redrawn.
3. The erasing and redrawing process can take several seconds for a complex picture.
4. For these reasons, storage displays have been largely replaced by raster systems.
https://E-next.in
Prof. Tirup Parmar
FLAT-PANEL DISPLAYS
Although most graphics monitors are still constructed with CRTs, other technologies are
emerging that may soon replace CRT monitors. The term flat-panel display refers to a class of
video devices that have
1. Reduced volume
2. Weight
3. Power requirements
compared to a CRT. A significant feature of it is that they are thinner than CRTs, and
can hang them on walls or wear them on our wrists.
Current uses for flat-panel displays include small TV monitors, calculators, pocket
video games, laptop computers, armrest viewing of movies on airlines, as advertisement
boards in elevators, and as graphics displays in applications requiring rugged, portable
monitors and pocket notepads.
1. Emissive displays (or emitters): These devices that convert electrical energy into light.
Examples:
1. Plasma panels.
2. Thin-film electroluminescent.
3. Light-Emitting Diodes (LED).
Flat CRTs have also been devised, in which electron beams arts accelerated parallel to the
screen, then deflected 90' to the screen. But flat CRTs have not proved to be as successful as
other emissive devices.
2. Non-emissive displays (or non-emitters): These device use optical effects to convert sunlight
or light from some other source into graphics patterns.
Example:
1. Liquid-Crystal Device (LCD)
PLASMA PANELS:
https://E-next.in
Prof. Tirup Parmar
Picture definition is stored in a refresh buffer, and the firing voltages are applied to
refresh the pixel positions (at the intersections of the conductors) 60 times per second.
Alternating methods are used to provide faster application of the firing voltages, and thus
brighter displays.
Separation between pixels is provided by the electric field of the conductors.
One disadvantage of plasma panels has been that they were strictly monochromatic
devices, but systems have been developed that are now capable of displaying color and
grayscale.
Thin-Film Electroluminescent:
Disadvantage: These displays require more power than plasma panels, and good color and
gray scale displays are hard to achieve.
These are commonly used in small systems, such as calculators and portable, laptop
computers
These non-emissive devices produce a picture by passing polarized light from the
surroundings or from an internal light source through a liquid-crystal material that can be
aligned to either block or transmit the light.
The term liquid crystal refers to the fact that these compounds have a crystalline
arrangement of molecules, yet they flow like a liquid.
Flat-panel displays commonly use nematic (threadlike) liquid-crystal compounds that
tend to keep the long axes of the rod-shaped molecules aligned.
A flat-panel display can then be constructed with a nematic liquid crystal.
Passive-Matrix LCD: Two glass plates, each containing a light polarizer at right angles
to the-other plate, sandwich the liquid-crystal material. Rows of horizontal transparent
conductors are built into one glass plate, and columns of vertical conductors are put into
https://E-next.in
Prof. Tirup Parmar
the other plate. The intersection of two conductors defines a pixel position. Normally, the
molecules are aligned as shown in the "on state".
Polarized light passing through the material is twisted so that it will pass through the
opposite polarizer. The light is then reflected back to the viewer.
To turn off the pixel, apply a voltage to the two intersecting conductors to align the
molecules so that the light is not .twisted.
This type of flat-panel device is referred to as a passive-matrix LCD. Picture definitions
are stored in a refresh buffer, and the screen is refreshed at the rate of 60 frames per
second, as in the emissive devices.
Back lighting is also commonly applied using solid-state electronic devices, so that the
system is not completely dependent on outside light sources be displayed by using
different materials or dyes and by placing a triad of color pixels at each screen location.
Active-Matrix Displays: Another method for constructing LCD is to place a transistor
at each pixel location, using thin-film transistor technology. The transistors are used to
control the voltage at pixel locations and to prevent charge from gradually leaking out of
the liquid-crystal cells. These devices are called active-matrix displays.
Video Basics
What is Video?
Video, or moving image in general, is created from a sequence of still images
called frames.
By recording and then playing back frames in quick succession, an illusion of movement
is created.
Video can be edited by removing some frames and combining sequences of frames,
called clips, together in a timeline.
https://E-next.in
Prof. Tirup Parmar
File-based formats such as AVCHD are already stored as files and can be transferred to a
computer for editing via USB.
File-based formats may need to be converted during or after transfer to be compatible
with editing software.
What is a Frame?
A frame is a single still image within a video clip.
As with any digital image, a frame consists of pixels (picture elements), with each pixel
representing a colour within the image.
The higher the number of pixels, the more accurately an image can be represented. This
is called resolution and is measured in megapixels.
https://E-next.in
Prof. Tirup Parmar
What is Timecode?
Timecode is how the duration of video is measured, and is divided into hours, minutes,
seconds and frames, like so: HH:MM:SS:FF.
An example: 00:01:22:06 means 1 minute, 22 seconds and 6 frames.
It is recorded by the video camera as part of the video signal, and is used to navigate and
locate video when editing.
https://E-next.in
Prof. Tirup Parmar
https://E-next.in
Prof. Tirup Parmar
HD video formats are normally written like so: HDV1080p25 or HDV1080i50, which
means:
A video controller, often referred to as a video or graphics card, is a key hardware component
that allows computers to generate graphic information to any video display devices, such as
a monitor or projector. They are also known as graphics or video adapters. Some
modern computers do not include video cards, but rather have graphics processing units directly
integrated into the computer's motherboard.
Older Video Controllers
A video controller, once more commonly referred to as a video display controller, were used in
older models of home-computers during the 1980s; they were also used in some early video
game system consoles. Their main function as an integrated circuit in a video signal generator
was to produce television video signals in computers or game systems. Although they could
generate graphics, older video controller models did not have specialized hardware accelerators
that created 2D and 3D images.
Modern video controllers are installed with hardware accelerators that create both 2D and 3D
images. They also offer various functions beyond accelerated image rendering, such as TV
output and the ability to hook up to several monitors. Although many computers' motherboards
are already integrated with graphics processing units, you can disable the integrated graphics
chip via the computer's BIOS to install a higher-performance video controller via the accelerated
graphics port. For a modern video controller to function properly in a computer,
https://E-next.in
Prof. Tirup Parmar
a computer needs to have four essential units: a functioning motherboard, a processor that
generates the power that a video controller needs to perform its tasks, enough memory to
distribute the images created by the GPU and a screen or monitor to properly display these
images.
GPU
As the brain of a computer's motherboard is the CPU, video controllers have their own unique
"centers," referred to as the graphics processing unit, although the GPU is also referred to as the
visual processing unit. The GPU's specialized electronic circuit is designed specifically to
translate data into graphic images and performs complex mathematical calculations in order to
do so. GPUs are also embedded into mobile phonesand game consoles.
A modern video controller, more frequently referred to as a video card, are installed into
expansion slots onto the motherboard of a computer. The parts of a modern video card include
power supply connectors, a cooling fan, a GPU, and typically also have a PCIe interface,
Graphics Double Data Rate version 5 memory, a display port, a digital video interface and an
HDMI interface. While some video cards have only one port for connection, other advanced
cards have multiple ports that connect to additional televisions and monitors. Advanced 3D
graphics cards, which are more expensive than the average consumer graphics card, allow
consumers to preview modeling viewpoints more fluidly. For example, both AMD Radeon
and Nvidia release popular graphics cards used by gamers. At the time of publication, the specs
for a high-performance video card made by AMD is the Radeon video card, which has 4GB of
memory, 1250 MHz memory clock speed and 320GB per-second memory bandwidth. For
graphic artists, many computers come with GPU-accelerated apps, such as Microsoft's DirectX
or Nvida's close integration with the Autodesk suite. Rather than utilizing a video card slot,
GPU-accelerated programs are integrated into the CPU.
https://E-next.in
Prof. Tirup Parmar
Scan conversion
DDA Line generation Algorithm in Computer Graphics
In any 2-Dimensional plane if we connect two points (x0, y0) and (x1, y1), we get a line segment.
But in the case of computer graphics we can not directly join any two coordinate points, for that
we should calculate intermediate point’s coordinate and put a pixel for each intermediate point, of
the desired color with help of functions like putpixel(x, y, K) in C, where (x,y) is our co-ordinate
and K denotes some color.
Examples:
points.
points.
For using graphics functions, our system output screen is treated as a coordinate system where the
coordinate of the top-left corner is (0, 0) and as we move down our x-ordinate increases and as we
move right our y-ordinate increases for any point (x, y).
Now, for generating any line segment we need intermediate points and for calculating them we
have can use a basic algorithm called DDA(Digital differential analyzer) line generating
algorithm.
DDA Algorithm:
Consider one point of the line as (X0,Y0) and the second point of the line as (X1,Y1).
// calculate dx , dy
dx = X1 - X0;
dy = Y1 - Y0;
https://E-next.in
Prof. Tirup Parmar
X = X0;
Y = Y0;
putpixel (X,Y,WHITE);
X += Xinc;
Y += Yinc;
https://E-next.in
Prof. Tirup Parmar
// Driver program
int main()
{
int gd = DETECT, gm;
Above algorithm works, but it is slow. The idea of Bresenham's algorithm is to avoid floating
point multiplication and addition to compute mx + c, and then computing round value of (mx +
c) in every step. In Bresenham's algorithm, we move across the x-axis in unit intervals.
https://E-next.in
Prof. Tirup Parmar
2. We would like to pick the y value (among Yk + 1 and Yk) corresponding to a point that is
closer to the original line.
We need to a decision parameter to decide whether to pick Yk + 1 or Yk as next point. The idea is
to keep track of slope error from previous increment to y. If the slope error becomes greater than
0.5, we know that the line has moved upwards one pixel, and that we must increment our y
coordinate and readjust the error to represent the distance from the top of the new pixel – which is
done by subtracting one from error.
// Modifying the naive way to use a parameter
// to decide next y.
void withDecisionParameter(x1, x2, y1, y2)
{
m = (y2 - y1)/(x2 - x1)
slope_error = [Some Initial Value]
for (x = x1, y = y1; x <= x2; x++)
{
print(x, y);
https://E-next.in
Prof. Tirup Parmar
https://E-next.in
Prof. Tirup Parmar
The algorithm is very similar to the Mid-Point Line Generation Algorithm. Here, only the
boundary condition is different.
For any given pixel (x, y), the next pixel to be plotted is either (x, y+1) or (x-1, y+1). This can be
decided by following the steps below.
1. Find the mid-point p of the two possible pixels i.e (x-0.5, y+1)
2. If p lies inside or on the circle perimeter, we plot the pixel (x, y+1), otherwise if it’s outside
we plot the pixel (x-1, y+1)
https://E-next.in
Prof. Tirup Parmar
Boundary Condition : Whether the mid-point lies inside or outside the circle can be decided
by using the formula:-
In our program we denote F(p) with P. The value of P is calculated at the mid-point of the two
contending pixels i.e. (x-0.5, y+1). Each pixel is described with a subscript k.
https://E-next.in
Prof. Tirup Parmar
The first point to be plotted is (r, 0) on the x-axis. The initial value of P is calculated as follows:-
Examples:
We have already discussed the Mid-Point circle drawing algorithm. Now we will discuss about
the Bresenham’s circle drawing algorithm.
Both of these algorithms uses the key feature of circle that it is highly symmetric. So, for whole
360 degree of circle we will divide it in 8-parts each octant of 45 degree. In order to that we will
use Bresenham’s Circle Algorithm for calculation of the locations of the pixels in the first octant
of 45 degrees. It assumes that the circle is centered on the origin. So for every pixel (x, y) it
calculates, we draw a pixel in each of the 8 octants of the circle as shown below :
https://E-next.in
Prof. Tirup Parmar
Now, we will see how to calculate the next pixel location from a previously known pixel location
(x, y). In Bresenham’s algorithm at any point (x, y) we have two option either to choose the next
pixel in the east i.e. (x+1, y) or in the south east i.e. (x+1, y-1).
d = 3 - (2 * r)
x = 0
y = r
https://E-next.in
Prof. Tirup Parmar
drawCircle() function:
// function to draw all other 7 pixels
// present at symmetric position
drawCircle(int xc, int yc, int x, int y)
{
putpixel(xc+x, yc+y, RED);
putpixel(xc-x, yc+y, RED);
putpixel(xc+x, yc-y, RED);
putpixel(xc-x, yc-y, RED);
putpixel(xc+y, yc+x, RED);
putpixel(xc-y, yc+x, RED);
putpixel(xc+y, yc-x, RED);
putpixel(xc-y, yc-x, RED);
}
1. Set RXSq = RX * RX
2. Set RYSq = RY * RY
3. Set X = 0 and Y = RY
8. Set X = X + 1
9. PX = PX + 2 * RYSq
https://E-next.in
Prof. Tirup Parmar
12. Else
13. Set Y = Y – 1
[End of If]
19. Set Y = Y – 1
23. Else
24. Set X = X + 1
[End of If]
28. Exit
https://E-next.in
Prof. Tirup Parmar
2. Call PutPixel(XC - X, YC + Y)
3. Call PutPixel(XC + X, YC - Y)
4. Call PutPixel(XC - X, YC - Y)
5. Exit
Line clipping
In computer graphics, line clipping is the process of removing lines or portions of lines outside
an area of interest. Typically, any line or part thereof which is outside of the viewing area is
removed.
There are two common algorithms for line clipping: Cohen–Sutherland and Liang–Barsky.
A line-clipping method consists of various parts. Tests are conducted on a given line segment to
find out whether it lies outside the view volume. Afterwards, intersection calculations are carried
out with one or more clipping boundaries.[1]
Determining which portion of the line is inside or outside of the clipping volume is done by
processing the endpoints of the line with regards to the intersection.
https://E-next.in
Prof. Tirup Parmar
line 1 : x1 = 5, y1 = 5, x2 = 7, y2 = 7
Line 2 : x1 = 7, y1 = 9, x2 = 11, y2 = 4
Line 2 : x1 = 1, y1 = 5, x2 = 4, y2 = 1
Line 3 : Rejected
"inside" region.
find its region's four bit code. Four bit code can
https://E-next.in
Prof. Tirup Parmar
https://E-next.in
Prof. Tirup Parmar
Pseudo Code:
Step 1 : Assign a region code for two endpoints of given line.
Step 3 : Else, perform the logical AND operation for both region codes.
Step 3.1 : If the result is not 0000, then given line is completely
outside.
https://E-next.in
Prof. Tirup Parmar
return code;
}
Clipping Polygons
An algorithm that clips a polygon must deal with many different cases. The case is particularly
note worthy in that the concave polygon is clipped into two separate polygons. All in all, the task
of clipping seems rather complex. Each edge of the polygon must be tested against each edge of
the clip rectangle; new edges must be added, and existing edges must be discarded, retained, or
divided. Multiple polygons may result from clipping a single polygon. We need an organized
way to deal with all these cases.
https://E-next.in
Prof. Tirup Parmar
Note the difference between this strategy for a polygon and the Cohen-Sutherland algorithm for
clipping a line: The polygon clipper clips against four edges in succession, whereas the line
clipper tests the outcode to see which edge is crossed, and clips only when necessary.
Polygons can be clipped against each edge of the window one at a time. Windows/edge
intersections, if any, are easy to find since the X or Y coordinates are already known.
Vertices which are kept after clipping against one window edge are saved for clipping
against the remaining edges.
Note that the number of vertices usually changes and will often increases.
We are using the Divide and Conquer approach.
https://E-next.in
Prof. Tirup Parmar
After clipped by the right and bottom After clipped by the right, bottom, and
clip boundaries. left clip boundaries.
https://E-next.in