CGMT Unit1
CGMT Unit1
• Modern tool usage: Create, select, and apply appropriate techniques, resources, and
modern engineering and IT tools including prediction and modeling to complex
engineering activities with an understanding of the limitations.
• The engineer and society: Apply reasoning informed by the contextual knowledge to
assess societal, health, safety, legal and cultural issues and the consequent
responsibilities relevant to the professional engineering practice.
• Life-long learning: Recognize the need for, and have the preparation and ability to
engage in independent and life-long learning in the broadest context of technological
change.
PEO1: To provide students with the fundamentals of Engineering Sciences with more
emphasis in computer science and engineering by way of analyzing and exploiting
engineering challenges.
PEO2: To train students with good scientific and engineering knowledge so as to comprehend,
analyze, design, and create novel products and solutions for the real life problems.
PEO5: To prepare students to excel in Industry and Higher education by educating Students
along with High moral values and Knowledge.
CO-PO Mapping
Computer Graphics & Multimedia Techniques 5CS4-04
PO1 PO2 PO3 PO4 PO5 PO6 PO7 PO8 PO9 PO10 PO11 PO12
CO1 : Implement
geometric images
3 2 3 2 2 1 1 1 1 2 1 3
using graphical input
techniques
CO2: Design and
develop images with
3 2 3 2 2 2 1 1 1 2 1 3
the help of 2D & 3D
transformations.
CO3: Identify visible
surfaces for
generation of realistic 3 3 3 3 2 2 1 2 1 2 1 3
graphics display and
curves representation.
CO4: Analyse
multimedia and 3 3 3 3 3 2 2 1 1 2 2 3
animation techniques.
CO-PSO Mapping
CO’s PSO1 PSO2
CO1: Implement geometric images using graphical input
2 2
techniques
CO2: Design and develop images with the help of 2D & 3D
2 2
transformations.
CO3: Identify visible surfaces for generation of realistic
2 2
graphics display and curves representation.
CO4: Analyse multimedia and animation techniques. 2 2
Lecture Plan of Computer Graphics & Multimedia Techniques ( CGMT)
5CS4-04
Unit
No./
Lect.
Total Topics
Req.
lec.
Req.
Unit- Introduction: Objective, scope and outcome of the course.
1
1(1)
Unit-
Fill area primitives including scan- line polygon filling, inside-outside test, boundary and 2
flood-fill
3(7)
character generation, line attributes, area-fill attributes, character attributers. Aliasing, and 2
introduction to Anti Aliasing (No anti aliasing algorithm)
3D display methods, polygon surfaces, tables, equations, meshes, curved lies and surfaces 2
quadric surfaces, spline representation, cubic spline interpolation methods, Bazier curves
2
and surfaces
Unit-
B-spline curves and surfaces.3D scaling, rotation and translation, composite
5(8) 2
transformation
Unit- Light sources – basic illumination models – halftone patterns and dithering techniques
1
6(6)
Properties of light – Standard primaries and chromaticity diagram 2
Intuitive colour concepts – RGB colour model – YIQ colour model – CMY colour model –
2
HSV colour model – HLS colour model
Colour selection. 1
Unit-
7(6) Tiling the plane – Recursively defined curves – Koch curves – C curves – Dragons –
space filling curves –fractals – Grammar based models – fractals – turtle graphics – ray
3
tracing.
Introduction
Computer is information processing machine. User needs to communicate with computer and the
computer graphics is one of the most effective and commonly used ways of communication with the
user.
It displays the information in the form of graphical objects such as pictures, charts, diagram and graphs.
Graphical objects convey more information in less time and easily understandable formats for example
statically graph shown in stock exchange.
In computer graphics picture or graphics objects are presented as a collection of discrete pixels.
We can control intensity and color of pixel which decide how picture look like.
The special procedure determines which pixel will provide the best approximation to the desired picture
or graphics object this process is known as Rasterization.
The process of representing continuous picture or graphics object as a collection of discrete pixels is
called Scan Conversion.
Advantages of computer graphics
Computer graphics is one of the most effective and commonly used ways of communication
with computer.
It provides tools for producing picture of “real-world” as well as synthetic objects such as mathematical
surfaces in 4D and of data that have no inherent geometry such as survey result.
It has ability to show moving pictures thus possible to produce animations with computer graphics.
With the use of computer graphics we can control the animation by adjusting the speed, portion
of picture in view the amount of detail shown and so on.
It provides tools called motion dynamics. In which user can move objects as well as observes as
per requirement for example walk throw made by builder to show flat interior and surrounding.
It provides facility called update dynamics. With this we can change the shape color and other
properties of object.
Now in recent development of digital signal processing and audio synthesis chip the interactive
graphics can now provide audio feedback along with the graphical feed backs.
Display devices
Display devices are also known as output devices.
Most commonly used output device in a graphics system is a video monitor.
Cathode-ray-tubes
CPU
I/O Port
Display
buffer (Interaction (Display
memory data) command)
Keyboard Mouse
Vector scan display directly traces out only the desired lines on CRT.
If we want line between point p1 & p2 then we directly drive the beam deflection circuitry which
focus beam directly from point p1 to p2.
If we do not want to display line from p1 to p2 and just move then we can blank the beam as we move it.
To move the beam across the CRT, the information about both magnitude and direction is required. This
information is generated with the help of vector graphics generator.
Fig. 1.2 shows architecture of vector display. It consists of display controller, CPU, display buffer memory
and CRT.
Display controller is connected as an I/O peripheral to the CPU.
Display buffer stores computer produced display list or display program.
The Program contains point & line plotting commands with end point co-ordinates as well as character
plotting commands.
Display controller interprets command and sends digital and point co-ordinates to a vector generator.
Vector generator then converts the digital co-ordinate value to analog voltages for beam deflection
circuits that displace an electron beam which points on the CRT’s screen.
In this technique beam is deflected from end point to end point hence this techniques is also called
random scan.
We know as beam strikes phosphors coated screen it emits light but that light decays after few
milliseconds and therefore it is necessary to repeat through the display list to refresh the screen at least
30 times per second to avoid flicker.
As display buffer is used to store display list and used to refreshing, it is also called refresh buffer.
Raster scan display
CPU
I/O Port
(Interaction (Display
data) command
Keyboard
Display controller
Mouse
00000000000000000
00000111111100000 CRT
00000000100000000 Video controller T
00000000100000000
00000000100000000
Refresh buffer
Fig. 1.3 shows the architecture of Raster display. It consists of display controller, CPU, video controller,
refresh buffer, keyboard, mouse and CRT.
The display image is stored in the form of 1’s and 0’s in the refresh buffer.
The video controller reads this refresh buffer and produces the actual image on screen.
It will scan one line at a time from top to bottom & then back to the top.
Horizontal
Vertical
OFF ON Retrace
Retrace
In this method the horizontal and vertical deflection signals are generated to move the beam all over the
screen in a pattern shown in fig. 1.4.
Here beam is swept back & forth from left to the right.
When beam is moved from left to right it is ON.
When beam is moved from right to left it is OFF and process of moving beam from right to left
after completion of row is known as Horizontal Retrace.
When beam is reach at the bottom of the screen. It is made OFF and rapidly retraced back to the top left
to start again and process of moving back to top is known as Vertical Retrace.
The screen image is maintained by repeatedly scanning the same image. This process is known as
Refreshing of Screen.
In raster scan displays a special area of memory is dedicated to graphics only. This memory is called
Frame Buffer.
Frame buffer holds set of intensity values for all the screen points.
That intensity is retrieved from frame buffer and display on screen one row at a time.
Each screen point referred as pixel or Pel (Picture Element).
Each pixel can be specified by its row and column numbers.
It can be simply black and white system or color system.
In simple black and white system each pixel is either ON or OFF, so only one bit per pixel is needed.
Additional bits are required when color and intensity variations can be displayed up to 24-bits per pixel
are included in high quality display systems.
On a black and white system with one bit per pixel the frame buffer is commonly called a Bitmap.
And for systems with multiple bits per pixel, the frame buffer is often referred as a Pixmap.
Electron Beam The electron beam is swept across the The electron beam is directed only to the
screen, one row at a time, from top to parts of screen where a picture is to be
bottom. drawn.
Resolution Its resolution is poor because raster Its resolution is good because this system
system in contrast produces zigzag produces smooth lines drawings because
lines that are plotted as discrete point CRT beam directly follows the line path.
sets.
Picture Definition Picture definition is stored as a set of Picture definition is stored as a set of line
intensity values for all screen points, drawing instructions in a display file.
called pixels in a refresh buffer area.
Realistic Display The capability of this system to store These systems are designed for line-
intensity values for pixel makes it well drawing and can’t display realistic shaded
suited for the realistic display of scenes scenes.
contain shadow and color pattern.
Draw an Image Screen points/pixels are used to draw Mathematical functions are used to draw
an image. an image.
Color CRT monitors
A CRT monitors displays color pictures by using a combination of phosphors that emit different
colored light.
It produces range of colors by combining the light emitted by different phosphors.
There are two basic techniques for color display:
Beam-penetration technique
Shadow-mask technique
Beam-penetration technique
Shadow-mask technique
The low speed electrons then penetrate the storage grid and strike the phosphor coating
without affecting the positive charge pattern on the storage grid.
During this process the collector just behind the storage grid smooth out the flow of flood electrons.
Advantage of DVST
Refreshing of CRT is not required.
Very complex pictures can be displayed at very high resolution without flicker.
Flat screen.
Disadvantage of DVST
They do not display color and are available with single level of line intensity.
For erasing it is necessary to removal of charge on the storage grid so erasing and redrawing
process take several second.
Erasing selective part of the screen cannot be possible.
Cannot used for dynamic graphics application as on erasing it produce unpleasant flash over
entire screen.
It has poor contrast as a result of the comparatively low accelerating potential applied to the
flood electrons.
The performance of DVST is somewhat inferior to the refresh CRT.
It is similar to plasma panel display but region between the glass plates is filled with phosphors such
as zinksulphide doped with magnesium instead of gas.
When sufficient voltage is applied the phosphors becomes a conductor in area of intersection of the
two electrodes.
Electrical energy is then absorbed by the manganese atoms which then release the energy as a spot
of light similar to the glowing plasma effect in plasma panel.
It requires more power than plasma panel.
In this good color and gray scale difficult to achieve.
Fig. 1.10: - Light twisting shutter effect used in design of most LCD.
It is generally used in small system such as calculator and portable laptop.
This non emissive device produce picture by passing polarized light from the surrounding or from an
internal light source through liquid crystal material that can be aligned to either block or transmit the
light.
The liquid crystal refreshes to fact that these compounds have crystalline arrangement of molecules
then also flows like liquid.
It consists of two glass plates each with light polarizer at right angles to each other sandwich the liquid
crystal material between the plates.
Rows of horizontal transparent conductors are built into one glass plate, and column of vertical
conductors are put into the other plates.
The intersection of two conductors defines a pixel position.
In the ON state polarized light passing through material is twisted so that it will pass through the
opposite polarizer.
In the OFF state it will reflect back towards source.
We applied a voltage to the two intersecting conductor 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.
In active matrix LCD transistors are used at each (x, y) grid point.
Transistor cause crystal to change their state quickly and also to control degree to which the state has
been changed.
Transistor can also serve as a memory for the state until it is changed.
So transistor make cell ON for all time giving brighter display then it would be if it had to be refresh
periodically
CRT
Viewer
Vibrating mirror changes its focal length due to vibration which is synchronized with the display of an
object on CRT.
The each point on the object is reflected from the mirror into spatial position corresponding to distance
of that point from a viewing position.
Very good example of this system is GENISCO SPACE GRAPH system, which use vibrating mirror to
project 3D objects into a 25 cm by 25 cm by 25 cm volume. This system is also capable to show 2D cross
section at different depth.
Stereoscopic system
Stereoscopic views does not produce three dimensional images, but it produce 3D effects by
presenting different view to each eye of an observer so that it appears to have depth.
To obtain this we first need to obtain two views of object generated from viewing
direction corresponding to each eye.
We can construct the two views as computer generated scenes with different viewing positions or
we can use stereo camera pair to photograph some object or scene.
When we see simultaneously both the view as left view with left eye and right view with right eye
then two views is merge and produce image which appears to have depth.
One way to produce stereoscopic effect is to display each of the two views with raster system
on alternate refresh cycles.
The screen is viewed through glasses with each lance design such a way that it act as a
rapidly alternating shutter that is synchronized to block out one of the views.
Virtual-reality
Virtual reality is the system which produce images in such a way that we feel that our surrounding
is what we are set in display devices but in actually it does not.
In virtual reality user can step into a scene and interact with the environment.
A head set containing an optical system to generate the stereoscopic views is commonly used in
conjunction with interactive input devices to locate and manipulate objects in the scene.
Sensor in the head set keeps track of the viewer’s position so that the front and back of objects can
be seen as the viewer “walks through” and interacts with the display.
Virtual reality can also be produce with stereoscopic glass and video monitor instead of head set. This
provides low cost virtual reality system.
Sensor on display screen track head position and accordingly adjust image depth.
Raster graphics systems having additional processing unit like video controller or display controller.
Here frame buffer can be anywhere in the system memory and video controller access this for refresh
the screen.
In addition to video controller more processors are used as co-processors to accelerate the system in
sophisticated raster system.
Raster graphics system with a fixed portion of the system memory reserved
for the frame buffer
A fixed area of the system memory is reserved for the frame buffer and the video controller can
directly access that frame buffer memory.
Frame buffer location and the screen position are referred in Cartesian coordinates.
For many graphics monitors the coordinate origin is defined at the lower left screen corner.
Screen surface is then represented as the first quadrant of the two dimensional systems with positive X-
value increases as left to right and positive Y-value increases bottom to top.
Basic refresh operation of video controller
Y
registerregister
Frame Buffer
Two registers are used to store the coordinates of the screen pixels which are X and Y
Initially the X is set to 0 and Y is set to Ymax.
The value stored in frame buffer for this pixel is retrieved and used to set the intensity of the CRT beam.
After this X register is incremented by one.
This procedure is repeated till X becomes equals to Xmax.
Then X is set to 0 and Y is decremented by one pixel and repeat above procedure.
This whole procedure is repeated till Y is become equals to 0 and complete the one refresh cycle. Then
controller reset the register as top –left corner i.e. X=0 and Y=Ymax and refresh process start for next
refresh cycle.
Since screen must be refreshed at the rate of 60 frames per second the simple procedure illustrated in
figure cannot be accommodated by typical RAM chips.
To speed up pixel processing video controller retrieves multiple values at a time using more numbers of
registers and simultaneously refresh block of pixel.
Such a way it can speed up and accommodate refresh rate more than 60 frames per second.
An application program is input & stored in the system memory along with a graphics package.
Graphics commands in the application program are translated by the graphics package into a display file
stored in the system memory.
This display file is used by display processor to refresh the screen.
Display process goes through each command in display file. Once during every refresh cycle.
Sometimes the display processor in random scan system is also known as display processing unit or
a graphics controller.
In this system graphics platform are drawn on random scan system by directing the electron beam
along the component times of the picture.
Lines are defined by coordinate end points.
This input coordinate values are converts to X and Y deflection voltages.
A scene is then drawn one line at a time.
Keyboards
Keyboards are used as entering text strings. It is efficient devices for inputting such a non-graphics data
as picture label.
Cursor control key’s & function keys are common features on general purpose keyboards.
Many other application of key board which we are using daily used of computer graphics
are commanding & controlling through keyboard etc.
Mouse
Mouse is small size hand-held box used to position screen cursor.
Wheel or roller or optical sensor is directing pointer on the according to movement of mouse.
Three buttons are placed on the top of the mouse for signaling the execution of some operation.
Now a day’s more advance mouse is available which are very useful in graphics application for example Z
mouse.
Trackball is ball that can be rotated with the finger or palm of the hand to produce cursor movement.
Potentiometer attached to the ball, measure the amount and direction of rotation.
They are often mounted on keyboard or Z mouse.
Space ball provide six-degree of freedom i.e. three dimensional.
In space ball strain gauges measure the amount of pressure applied to the space ball to provide input
for spatial positioning and orientation as the ball is pushed or pulled in various directions.
Space balls are used in 3D positioning and selection operations in virtual reality system,
modeling, animation, CAD and other application.
Joysticks
A joy stick consists of small vertical lever mounted on a base that is used to steer the screen
cursor around.
Most joy sticks selects screen positioning according to actual movement of stick (lever).
Some joy sticks are works on pressure applied on sticks.
Sometimes joy stick mounted on keyboard or sometimes used alone.
Movement of the stick defines the movement of the cursor.
In pressure sensitive stick pressure applied on stick decides movement of the cursor. This pressure
is measured using strain gauge.
This pressure sensitive joy sticks also called as isometric joy sticks and they are non movable sticks.
Data glove
Data glove is used to grasp virtual objects.
The glow is constructed with series of sensors that detect hand and figure motions.
Electromagnetic coupling is used between transmitter and receiver antennas which used to
provide position and orientation of the hand.
Transmitter & receiver Antenna can be structured as a set of three mutually perpendicular coils
forming 3D Cartesian coordinate’s system.
Input from the glove can be used to position or manipulate object in a virtual scene.
Digitizer
Digitizer is common device for drawing painting or interactively selecting coordinates position on
an object.
One type of digitizers is graphics tablet which input two dimensional coordinates by activating hand
cursor or stylus at selected position on a flat surface.
Stylus is flat pencil shaped device that is pointed at the position on the tablet.
Image Scanner
Image Scanner scan drawing, graph, color, & black and white photos or text and can stored for computer
processing by passing an optical scanning mechanism over the information to be stored.
Once we have internal representation of a picture we can apply transformation.
We can also apply various image processing methods to modify the picture.
For scanned text we can apply modification operation.
Touch Panels
As name suggest Touch Panels allow displaying objects or screen-position to be selected with the touch
or finger.
A typical application is selecting processing option shown in graphical icons.
Some system such as a plasma panel are designed with touch screen
Other system can be adapted for touch input by fitting transparent touch sensing mechanism over
a screen.
Touch input can be recorded with following methods.
Optical methods
Electrical methods
Acoustical methods
Optical method
Optical touch panel employ a line of infrared LEDs along one vertical and one horizontal edge.
The opposite edges of the edges containing LEDs are contain light detectors.
When we touch at a particular position the line of light path breaks and according to that breaking line
coordinate values are measured.
In case two line cuts it will take average of both pixel positions.
LEDs operate at infrared frequency so it cannot be visible to user.
Electrical method
An electrical touch panel is constructed with two transparent plates separated by small distance.
One is coated with conducting material and other is coated with resistive material.
When outer plate is touch it will come into contact with internal plate.
When both plates touch it creates voltage drop across the resistive plate that is converted
into coordinate values of the selected position.
Acoustical method
In acoustical touch panel high frequency sound waves are generated in horizontal and vertical
direction across a glass plates.
When we touch the screen the waves from that line are reflected from finger.
These reflected waves reach again at transmitter position and time difference between sending
and receiving is measure and converted into coordinate values.
Light pens
Light pens are pencil-shaped device used to select positions by detecting light coming from points on the
CRT screen.
Activated light pens pointed at a spot on the screen as the electron beam lights up that spot and
generate electronic pulse that causes the coordinate position of the electron beam to be recorded.
Voice systems
It is used to accept voice command in some graphics workstations.
It is used to initiate graphics operations.
It will match input against predefined directory of words and phrases.
Dictionary is setup for a particular operator by recording his voice.
Each word is speak several times and then analyze the word and establishes a frequency pattern for that
word along with corresponding function need to be performed.
When operator speaks command it will match with predefine dictionary and perform desired action.
A general programming package provides an extensive set of graphics function that can be used in
high level programming language such as C or FORTRAN.
It includes basic drawing element shape like line, curves, polygon, color of element transformation etc.
Example: - GL (Graphics Library).
Special-purpose application package are customize for particular application which implement required
facility and provides interface so that user need not to vory about how it will work (programming). User
can simply use it by interfacing with application.
Example: - CAD, medical and business systems.
Coordinate representations
Except few all other general packages are designed to be used with Cartesian coordinate specifications.
If coordinate values for a picture are specified is some other reference frame they must be converted
to Cartesian coordinate before giving input to graphics package.
Special-purpose package may allow use of other coordinates which suits application.
In general several different Cartesian reference frames are used to construct and display scene.
We can construct shape of object with separate coordinate system called modeling coordinates or
sometimes local coordinates or master coordinates.
Once individual object shapes have been specified we can place the objects into appropriate positions
called world coordinates.
Finally the World-coordinates description of the scene is transferred to one or more output device
reference frame for display. These display coordinates system are referred to as “Device Coordinates” or
“Screen Coordinates”.
Generally a graphic system first converts the world-coordinates position to normalized device
coordinates. In the range from 0 to 1 before final conversion to specific device coordinates.
An initial modeling coordinates position ( Xmc,Ymc) in this illustration is transferred to a device
coordinates position(Xdc,Ydc) with the sequence ( Xmc,Ymc) ( Xwc,Ywc) ( Xnc,Ync) ( Xdc,Ydc).
Graphic Function
A general purpose graphics package provides user with Varity of function for creating and manipulating
pictures.
The basic building blocks for pictures are referred to as output primitives. They includes character,
string, and geometry entities such as point, straight lines, curved lines, filled areas and shapes defined
with arrays of color points.
Input functions are used for control & process the various input device such as mouse, tablet, etc.
Control operations are used to controlling and housekeeping tasks such as clearing display screen etc.
All such inbuilt function which we can use for our purpose are known as graphics function
Software Standard
Primary goal of standardize graphics software is portability so that it can be used in any
hardware systems & avoid rewriting of software program for different system
Some of these standards are discuss below
This system was adopted as a first graphics software standard by the international standard
organization (ISO) and various national standard organizations including ANSI.
GKS was originally designed as the two dimensional graphics package and then later extension was
developed for three dimensions.
PHIGS is extension of GKS. Increased capability for object modeling, color specifications,
surface rendering, and picture manipulation are provided in PHIGS.
Extension of PHIGS called “PHIGS+” was developed to provide three dimensional surface
shading capabilities not available in PHIGS.