BCA VI Sem Computer Graphics & Multimedia

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

Computer Graphics and Multimedia

BCA VI SEM

Syllabus

Unit Contents
Pixel, frame, buffer, application of computer graphics, Raster
Graphics fundamentals.
Unit- I Display Devices- Random Scan, Raster Scan Monitors, Color CRT
Monitor, DVST
and Plasma Panel.
Graphics Primitives : Algorithms for line Generation, circle
generation,
Polygon generation and polygon filling algorithm, Anti aliasing
Unit- II
2D Transformation : Translation, Scaling, Rotation, Reflection,
homogeneous Coordinates.
3-D Transformation : Translation, Scaling, Rotation,
windowing & clipping windows, view port, line clipping, polygon
Unit- III clipping, windows & view port transformation.
Display file, Segment table, Segment creation, deletion, rename,

Multimedia : Text – Font, Faces, animating Text, Hyper Text.


Sound : MIDI, Digital audio basics, auto file formats, audio editing,
MCI-multimedia
control interface.
Unit- IV Image - Bitmap, Vector drawing, color palate, concept of 3D
Modeling, Image file
formats (BMP,JPG)
Animation : principle of animation, cell animation, kinematics,
morphing.
Video – Broadcast video standards ( NTSC, PAL), Integrating
computer and
television, video capture board, video, colour, shooting and editing
video, recording
Unit- V formats 9S-VHS) video hardware resolution, video compression
(JPEG, MPEG)
Hard copy devices: Printers & plotters, Input devices : mouse,
Trackball, Light pen,
Scanner, Digital Camera.

Gram Reoti, Behind Aurobindo Hospital, Sanwer Road,Indore(M.P.) Ph: 6684190 1


Computer Graphics and Multimedia
BCA VI SEM

Unit – I

INTRODUCTION- Computer graphics is an art of drawing pictures, lines, charts, etc.


using computers with the help of programming. Computer graphics is made up of number of
pixels. Pixel is the smallest graphical picture or unit represented on the computer screen.
Basically there are two types of computer graphics namely, Interactive Computer graphics and
Non-Interactive Computer Graphics.

Interactive Computer Graphics: Whenever the user has control over the image by providing him
with an input device .For example the video game controller of the ping pong game. This helps
him to signal his request to the computer.The computer on receiving signals from the input
device can modify the displayed picture appropriately. To the user it appears that the picture is
changing instantaneously in response to his 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.

In real life interactive computer graphics may be used to train an airplane pilot by providing him
a simulator in place of the real airplane so that he may protect himself from any type of accident.
The flight simulator is a mockup 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.

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.

APPLICATION OF COMPUTER GRAPHICS –


1. Cartography: Computer graphics is used to produce both accurate and schematic
representations of geographical and other natural phenomena from measurement data.
Examples include geographic maps, relief maps, exploration maps for drilling and
mining, oceanographic charts, weather maps, contour maps, and population density maps.

Gram Reoti, Behind Aurobindo Hospital, Sanwer Road,Indore(M.P.) Ph: 6684190 2


Computer Graphics and Multimedia
BCA VI SEM

2. User interfaces: Most applications that run on personal computers and workstations, and
even those that run on terminals attached to timeshared computers and network computer
servers, have user interfaces that rely on desktop window systems to manage multiple
simultaneous activities, and on point and click facilities to allow users to select menu
items, icons, and objects on the screen. Word processing, spreadsheet, and desktop-
publishing programs are typical applications of user interface facility.
3. Plotting in business, science and technology: The next most common use of graphics
today is probably to create 2D and 3D graphs of mathematical, physical, and economic
functions; histograms, bar and pie charts; task-scheduling charts; inventory and
production charts, and the like . All these are used to present meaningfully and concisely
the trends and patterns gleaned from data, so as to clarify complex phenomena and to
facilitate informed decision making.
4. Office automation and electronic publishing: The use of graphics for the creation and
dissemination of information has increased enormously since the advent of desktop
publishing on personal computers. Many organizations whose publications used to be
printed by outside specialists can now produce printed materials in house.
5. Computer-aided drafting and design: In computer-aided design (CAD), interactive
graphics is used to design components and systems of mechanical ,
electrical,electromechanical, and electronic devices, including structure such as buildings,
automobile bodies, airplane and ship hulls, very large scale-integrated (VLSI) chips,
optical systems, and telephone and computer networks. Sometimes, the use; merely wants
to produce the precise drawings of components and assemblies, as for online drafting or
architectural blueprints Color Plate 1.8 shows an example of such a 3Ddesign program,
intended for nonprofessionals also a customize your own patiodeck” program used in
lumber yards. More frequently however the emphasis is on interacting with a computer
based model of the component or system being designed in order to test, for example, its
structural, electrical, or thermal properties. Often,the model is interpreted by a simulator
that feeds back the behavior of the system tothe user for further interactive design and
test cycles. After objects have been designed, utility programs can post process the design

Gram Reoti, Behind Aurobindo Hospital, Sanwer Road,Indore(M.P.) Ph: 6684190 3


Computer Graphics and Multimedia
BCA VI SEM

database to make parts lists, to process ‘bills of materials’, to define numerical control
tapes for cutting or drilling parts, and so on.
6. Simulation and animation for scientific visualization and entertainment: Computer
produced animated movies and displays or the time-varying behavior of real and
simulated objects are becoming increasingly popular for scientific and engineering
visualization. We can use them to study abstract mathematical entries as well as
mathematical models of such phenomena as fluid flow, relativity, nuclear and chemical
reactions, physiological system and organ function, and deformation of mechanical
structures under various kinds of loads. Another advanced-technology area is interactive
cartooning. The simpler kinds of systems for producing ‘Flat” cartons are becoming cost-
effective in creating routine ‘in-between” frames that interpolate between two explicitly
specified ‘key frames”. Cartoon characters will increasingly be modeled in the computer
as 3D shape descriptions whose movements are controlled by computer commands,
rather than by the figures being drawn manually by cartoonists. Television commercials
featuring flying logos and more exotic visual trickery have become common, as have
elegant special effects in movies. Sophisticated mechanisms are available to model the
objects and to represent light and shadows.
7. Art and commerce: Overlapping the previous categories the use of computer graphics in
art and advertising here, computer graphics is used to produce pictures that express a
message and attract attention. Personal computers and Tele text and Video texts terminals
in public places such as in private homes, offer much simpler but still informative
pictures that let users orient themselves, make choices, or even “teleshop” and conduct
other business transactions. Finally, slide production for commercial, scientific, or
educational presentations is another cost-effective use of graphics, given the steeply
rising labor costs of the traditional means of creating such material.
8. Process control: Whereas flight simulators or arcade games let users interact with a
simulation of a real or artificial world, many other applications enable people or interact
with some aspect of the real world itself. Status displays in refineries, power plants, and
computer networks show data values from sensors attached to critical system
components, so that operators can respond to problematic conditions. For example,

Gram Reoti, Behind Aurobindo Hospital, Sanwer Road,Indore(M.P.) Ph: 6684190 4


Computer Graphics and Multimedia
BCA VI SEM

military commanders view field data – number and position of vehicles, weapons
launched, troop movements, causalities – on command and control displays to revise their
tactics as needed; flight controller airports see computer-generated identification and
status information for the aircraft blips on their radar scopes, and can thus control traffic
more quickly and accurately than they could with the uninitiated radar data alone;
spacecraft controllers monitor telemetry data and take corrective action as needed.

Raster Graphics Fundamentals:


Raster graphics are digital images created or captured (for example, by scanning in a photo) as a
set of samples of a given space. A raster is a grid of x and y coordinates on a display space.
(And for three-dimensional images, a z coordinate.) A raster image file identifies which of these
coordinates to illuminate in monochrome or color values. The raster file is sometimes referred
to as a bitmap because it contains information that is directly mapped to the display grid.

A raster file is usually larger than a vector graphics image file. A raster file is usually difficult to
modify without loss of information, although there are software tools that can convert a raster
file into a vector file for refinement and changes. Examples of raster image file types are: BMP,
TIFF, GIF, and JPEG files.

Raster-scan display
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. Picture definition is stored in 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). Each screen point is referred to as a pixel or pel
(shortened forms of picture element).The raster scan system is well suited for the realistic display
of scenes.
Intensity range for pixel position in a simple black and white system is one bit per pixel, as each
screen point is either ON or OFF. A bit value of 1 indicates that the beam intensity is to be ON,

Gram Reoti, Behind Aurobindo Hospital, Sanwer Road,Indore(M.P.) Ph: 6684190 5


Computer Graphics and Multimedia
BCA VI SEM

while 0 indicates OFF. But if color and intensity variations can be displayed, then additional bits
are needed up to 24 bit per pixel are there in high quality system. the storage for the frame buffer
require 3 megabytes of memory, if the frame buffer is to define a system with 24 bit per pixel
and a screen resolution of 1024 by 1024.
The frame buffer is referred to as a bitmap in a black and white system. While, it is called as a
pixmap for a system with multiple bit per pixel.
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.
At the end of each scan line, the electron beam returns to the left side of the screen to begin
displaying the next scan line. The return to the left of the screen, after refreshing each scan line,
is called the horizontal retrace of the electron beam. And at the end of each frame, the electron
beam returns (vertical retrace) to the top left corner of the screen to begin the next frame.

Gram Reoti, Behind Aurobindo Hospital, Sanwer Road,Indore(M.P.) Ph: 6684190 6


Computer Graphics and Multimedia
BCA VI SEM

Random-scan display
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 (Figure ) and refreshed by a random-scan system in any specified order.Example of
random scan system includes pen plotter etc.

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 referred to as
the refresh display file. 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 al the component lines of a
picture 30 to 60times each second.

Gram Reoti, Behind Aurobindo Hospital, Sanwer Road,Indore(M.P.) Ph: 6684190 7


Computer Graphics and Multimedia
BCA VI SEM

Difference between Raster Scan Display and Random Scan Display:


Base of
Raster Scan System Random Scan System
Difference
Electron The electron beam is swept across the screen, The electron beam is directed only to the parts
Beam one row at a time, from top to bottom. of screen where a picture is to be drawn.
Its resolution is poor because raster system in Its resolution is good because this system
Resolution contrast produces zig-zag lines that are plotted produces smooth lines drawings because CRT
as discrete point sets. beam directly follows the line path.
Picture definition is stored as a set of intensity
Picture Picture definition is stored as a set of line
values for all screen points, called pixels in a
Definition drawing instructions in a display file.
refresh buffer area.
The capability of this system to store intensity
Realistic values for pixel makes it well suited for the These systems are designed for line-drawing
Display realistic display of scenes contain shadow and and can’t display realistic shaded scenes.
color pattern.
Draw an Mathematical functions are used to draw an
Screen points/pixels are used to draw an image.
mage image.

Color CRT Monitor:


This was one of the earlier CRTs to produce color displays. Coating phosphors of different
compounds can produce different colored pictures. But the basic problem of graphics is not to
produce a picture of a predetermined color, but to produce color pictures, with the color
characteristics chosen at run time.
The basic principle behind colored displays is that combining the 3 basic colors –Red, Blue and
Green, which can produce every color. By choosing different ratios of these three colors we can
produce different colors – millions of them in-fact. We also have basic phosphors, which can
produce these basic colors. So, one should have a technology to combine them in different
combinations.
There are two popular techniques for producing color displays with a CRT are:

Gram Reoti, Behind Aurobindo Hospital, Sanwer Road,Indore(M.P.) Ph: 6684190 8


Computer Graphics and Multimedia
BCA VI SEM

1. Beam-penetration method2. Shadow-mask method

1. Beam Penetration method: This CRT is similar to the simple CRT, but it makes use of
multi coloured phosphorus of number of layers. Each phosphorus layer is responsible for one
colour. All other arrangements are similar to simple CRT. It can produce a maximum of 4 to 5
colours. The organization is something like this - The red, green and blue phosphorus are coated
in layers - one behind the other. If a low speed beam strikes the CRT, only the red colored
phosphorus is activated, a slightly accelerated beam would activate both red and green (because
it can penetrate deeper) and a much more activated one would add the blue component also.
But the basic problem is a reliable technology to accelerate the electronic beam to precise levels
to get the exact colors - it is easier said than done. However, a limited range of colors can be
conveniently produced using the concept.

2. The Shadow - Mask method.

This works, again, on the principle of combining the basic colors - Red, green and Blue - in
suitable proportions to get a combination of colors, but it's principle is much more sophisticated
and stable.

The shadow mask CRT, instead of using one electron gun, uses 3 different guns placed one by
the side of the other to form a triangle or a "Delta" as shown. Each pixel point on the screen is

Gram Reoti, Behind Aurobindo Hospital, Sanwer Road,Indore(M.P.) Ph: 6684190 9


Computer Graphics and Multimedia
BCA VI SEM

also made up of 3 types of phosphors to produce red, blue and green colors. Just before the
phosphor screen is a metal screen, called a "shadow mask".
This plate has holes placed strategically, so that when the beams from the three electron guns are
focused on a particular pixel, they get focused on particular color producing pixel only i.e. If for
convenience sake we can call the electronic beams as red, blue and green beams (though in
practice the colors are produced by the phosphors, and until the beams hit the phosphor dots,
they produce no colors), the metal holes focus the red beam onto the red color producing
phosphor, blue beam on the blue producing one etc. When focused on to a different pixel, the red
beam again focuses on to the red phosphor and so on.
Now, unlike the beam penetration CRTs where the acceleration of the electron beam was being
monitored, we now manipulate the intensity of the 3 beams simultaneously. If the red beam is
made more intense, we get more of red color in the final combination etc. Since fine-tuning of
the beam intensities is comparatively simple, we can get much more combination of colors than
the beam penetration case. In fact, one can have a matrix of combinations to produce a wide
variety of colors.
The shadow mask CRT, though better than the beam penetration CRT in performance, is not
without it's disadvantages. Since three beams are to be focused, the role of the "Shadow mask"
becomes critical. If the focusing is not achieved properly, the results tend to be poor. Also, since
instead of one pixel point in a monochrome CRT now each pixel is made up of 3 points (for 3
colors), the resolution of the CRT (no. of pixels) for a given screen size reduces.
Another problem is that since the shadow mask blocks a portion of the beams (while focusing
them through the holes) their intensities get reduced, thus reducing the overall brightness of the
picture. To overcome this effect, the beams will have to be produced at very high intensities to
begin with. Also, since the 3 color points, though close to each other, are still not at the same
point, the pictures tend to look like 3 colored pictures placed close by, rather than a single
picture. Of course, this effect can be reduced by placing the dots as close to one another as
possible.
The above displays are called refresh line drawing displays, because the picture vanishes
(typically in about 100 Milliseconds ) and the pictures have to be continuously refreshed so that
the human persistence of vision makes them see as static pictures. They are costly on one hand

Gram Reoti, Behind Aurobindo Hospital, Sanwer Road,Indore(M.P.) Ph: 6684190 10


Computer Graphics and Multimedia
BCA VI SEM

and also tend to flicker when complex pictures are displayed (Because refreshing because
complex).

These problems are partly overcome by devices with inherent storage devices - i.e. they continue
to display the pictures, till they are changed or at least for several minutes without the need of
being refreshed. We see one such device called the Direct View Storage Tube (DVST) below.
Direct View Storage Tube DVST:
Conceptually the Direct View Storage Tube (DVST) behaves like a CRT with highly persistent
phosphor. Pictures drawn on there will be seen for several minutes (40-50 minutes) before
fading. It is similar to CRT as far as the electronic gun and phosphor-coated mechanisms are
concerned. But instead of the electron beam directly writing the pictures on the phosphor coated
CRT screen, the writing is done with the help of a fine-mesh wire grid.

The grid made of very thin, high quality wire, is located with a dielectric and is mounted just
before the screen on the path of the electron beam from the gun. A pattern of positive charges is
deposited on the grid and this pattern is transferred to the phosphor coated CRT by a continuous
flood of electrons. This flood of electrons is produced by a "flood gun" (This is separate frame
the electron gun that produces the main electron beam).

Just behind the storage mesh is a second grid called the collector. The function of the collector is
to smooth out the flow of flood electrons. Since a large number of electrons are produced at high
velocity by the flood gun, the collector grid, which is also negatively charged reduces, the

Gram Reoti, Behind Aurobindo Hospital, Sanwer Road,Indore(M.P.) Ph: 6684190 11


Computer Graphics and Multimedia
BCA VI SEM

acceleration on these electrons and the resulting low velocity flood pass through the collector and
get attracted by the positively charged portions of the storage mesh (Since the electrons are
negatively charged), but are repelled by the other portions of the mesh which are negatively
charged (Note that the pattern of positive charges residing on the storage mesh actually defines
the picture to be displayed).
Thus, the electrons attracted by the positive charges pass through the mesh, travel on to the
phosphor coated screen and display the picture. Since the collector has slowed the electrons
down, they may not be able to produce sharp and bright images. To over come this problem, the
screen itself is maintained at a high positive potential by means of a voltage applied to a thin
aluminum coating between the tube face and the phosphor. The dotted circle on the mesh is
created by positive charges the flood of electrons hit the mesh at all points. But only those
electrons that hit the dotted circle pass through and hit the CRT screen. The negatively charged
mesh repels others. Since the phosphor is of a very high persistence quality, the picture created
on the CRT screen will be visible for several minutes without the need for being refreshed. Now
the problem arises as to how do we remove the picture, when the time for it's erasure or
modification comes up. The simple method is to apply a positive charge to the negatively
charged mesh so that it gets neutralized. This removes all charges and clears the screen. But this
technique also produces a momentary flash, which may be unpleasant to the viewer. This is
mainly so when only portions of the picture are to be modified in an interactive manner. Also,
since the electrons hit the CRT screen at very low speeds (though they are slightly accelerated in
the last part of their journey to the CRT by a positively charged aluminum coating), the contrasts
are not sharp. Also, even though the pictures stay for almost an hour, there will be a gradual
degradation because of the accumulation of the background glow.
The other popular display device is the plasma panel device, which is partly similar to the DVST
in principle, but over comes some of the undesirable features of the DVST.

Plasma Panel: In a plasma panel display, two glass plates having horizontal and vertical gold
electrodes are kept. These gold electrodes are covered with dielectric material. In between these
two glass plates there is another glass plate filled with neon gas. When voltage is applied through
the gold electrodes the neon gas is split in to independent cells and they start to glow. By

Gram Reoti, Behind Aurobindo Hospital, Sanwer Road,Indore(M.P.) Ph: 6684190 12


Computer Graphics and Multimedia
BCA VI SEM

applying voltages through the gold electrodes this glow can be controlled, thus, creating a
display. No refresh is required in a Plasma panel display.

Advantage and Disadvantages of Plasma Panel:

Advantages

∑ Capable of producing deeper blacks allowing for superior contrast ratio


∑ Wider viewing angles than those of LCD; images do not suffer from degradation at less
than straight ahead angles like LCDs. LCDs using IPS technology have the widest angles,
but they do not equal the range of plasma primarily due to "IPS glow", a generally whitish
haze that appears due to the nature of the IPS pixel design.
∑ Less visible motion blur, thanks in large part to very high refresh rates and a
faster response time, contributing to superior performance when displaying content with
significant amounts of rapid motion
∑ Superior uniformity. LCD panel backlights nearly always produce uneven brightness
levels, although this is not always noticeable. High-end computer monitors have
technologies to try to compensate for the uniformity problem
∑ Unaffected by clouding from the polishing process. Some LCD panel types, like IPS,
require a polishing process that can introduce a haze usually referred to as "clouding".
∑ Less expensive for the buyer per square inch than LCD, particularly when equivalent
performance is considered.

Gram Reoti, Behind Aurobindo Hospital, Sanwer Road,Indore(M.P.) Ph: 6684190 13


Computer Graphics and Multimedia
BCA VI SEM

Disadvantages

∑ Earlier generation displays were more susceptible to screen burn-in and image retention.
Recent models have a pixel orbiter that moves the entire picture slower than is noticeable to
the human eye, which reduces the effect of burn-in but does not prevent it.[14]
∑ Due to the bistable nature of the colour and intensity generating method, some people
will notice that plasma displays have a shimmering or flickering effect with a number of
hues, intensities and dither patterns.
∑ Earlier generation displays (circa 2006 and prior) had phosphors that lost luminosity over
time, resulting in gradual decline of absolute image brightness. Newer models have
advertised life spans exceeding 100 000 hours, far longer than older CRTs.
∑ Uses more electrical power, on average, than an LCD TV using an LED backlight. Older
CCFL backlights for LCD panels used quite a bit more power, and older plasma TVs used
quite a bit more power than recent models.
∑ Does not work as well at high altitudes above 6,500 feet (2,000 metres) due to pressure
differential between the gases inside the screen and the air pressure at altitude. It may cause a
buzzing noise. Manufacturers rate their screens to indicate the altitude parameters.
∑ For those who wish to listen to AM radio, or are amateur radio operators (hams) or
shortwave listeners (SWL), the radio frequency interference (RFI) from these devices can be
irritating or disabling.
∑ Plasma displays are generally heavier than LCD, and may require more careful handling
such as being kept upright.

Gram Reoti, Behind Aurobindo Hospital, Sanwer Road,Indore(M.P.) Ph: 6684190 14


Computer Graphics and Multimedia
BCA VI SEM

Unit – II
Algorithm for line Generation: There is basically two line generating algorithm:
1) DDA (Digital Differential Algorithm)
2) Bresenham’s line drawing algorithm

1) DDA: DDA algorithm is an incremental scan conversion method. Here we perform


calculations at each step using the results from the preceding step. The characteristic of the DDA
algorithm is to take unit steps along one coordinate and compute the corresponding values along
the other coordinate. The unit steps are always along the coordinate of greatest change, e.g. if dx
= 10 and dy = 5, then we would take unit steps along x and compute the steps along y.

DDA algorithm:
Step 1: Input to the function is two endpoints (x1,y1) and (x2,y2)
Step 2: length ← abs(x2-x1);
if (abs(y2-y1) > length) then length ←abs(y2-y1);
Step 3: xincrement ← (x2-x1) / length;
yincrement ← (y2-y1) / length;
Step 4: x ←x + 0.5; y ← Y + 0.5;
Step 5 : ???=?=←=N=??=??????=??????=?????=S=??=T
Step 6 : ????=E?????E?FI?????E?FFX
Step 7: ?=←=?=H??????????=X
?← ?=H=??????????=X
Step 8: ?????
q ??=a a ?=?????????=??=??????=????=???=??????=???=??=???=????=????????=?????=??=??????????=??????=??=
???=????=???????=???=????????=?????=???????????????
Advantages of DDA Algorithm
N?=f? =??=???=????????=?????????=???=??=????=???=???????=???????=??????=???=???????????????
O?=f?=??=?=??????=??????=???=???????????=?????=??????
???=????=???=??????=???=??=????????=?=?=??=H=?? =
f?
=??????????=???=??????? ???????=??=???=????????=??=??????=???=??=??????=???????????????I=??=???? =
???????????=??????????=???=???????=??=???=?=??=?=?????????=??=????=???=?????=?????????=?????=???=????=
?????

Disadvantages of DDA Algorithm


N?
= c ???????= ?????= ??????????= ??= a a ?= ?????????= ??= ?????= ????J???????
???
O?
==q ??=?????????=??=???????????=??????????
=e ???????=?????=????????=??=?????

Gram Reoti, Behind Aurobindo Hospital, Sanwer Road,Indore(M.P.) Ph: 6684190 15


Computer Graphics and Multimedia
BCA VI SEM

Consider the line from (0,0) to (4,6). Use the simple DDA algorithm to rasterize this line.
Sol. b ?????????=?????=N=??=R=??=???=a a ?=?????????=??=????

u ??=M= v N ?=M
u O ?=?= v O ?S
i ?????=?=?v OJv N?=?=S
∆u =?=? u OJ u ??
=L=i ?????
? ?LS?M? SSSST
∆v =?=? v OJ v ??
=L=i ?????
?=SLS?N
f??????=?????=???
u =?=MH=M? R=G=p???=EM? SSSSTF=?=M?
R
v =?=M=H=M? R=G=p???=ENF=?=M?R

Gram Reoti, Behind Aurobindo Hospital, Sanwer Road,Indore(M.P.) Ph: 6684190 16


Computer Graphics and Multimedia
BCA VI SEM

q ??=???????=???=???????=??=?????=??=???=c ??? =f?=?????=????=???=??????????=????=????=??=????=?????=??=


???=??????=????I=??
??=???=?????????=??=???????????=??????????
Example 2 Consider the line from (0, 0) to (-6, -6). Use the simple DDA algorithm line.

p???
=b ?????????=?????=N=??=R=??=???=a a ?=?????????=??=????

u ??=M= v N ?=M
u O ?=J S= v O ?J S
i ?????=?=???E=u OJu N= F=??=???Ev OJv N= F?=S
∆u =?=∆v =?=JN
f??????=??????=???
u =?=M=H=M?R=G=p???=EJNF=?JM? R
v =?=M=H=M?R=G=p???=EJNF=?JM? R

Gram Reoti, Behind Aurobindo Hospital, Sanwer Road,Indore(M.P.) Ph: 6684190 17


Computer Graphics and Multimedia
BCA VI SEM

q ??=???????=???=???????=??=?????=??=???=c ???
=f?
=?????=????=???=??????????=????=????=??=???=??????=????=
???=??=??=?R?=?????

2) Bresenham ‘s line drawing algorithm: q ??=?????????=?????????=??=???????=???????????=


????=??????????=?????????? =q ??=???=?????????=??? ???=?????????=??=????I=??=????=????=???????=
?????????????=j ?????=??????=???=?=????=??=????=?????????=???=??=????=????=??????=???????=???=
?????????=?=????????????
c ??=???????I=??=?????=??=???=?????????=????????? ???I=????=????????=EOI=PF=???=????=??=??????
???????=EPI=PF=???=EPI=?F?
=v ??=?????=????=???=?????=????=??=??????=??=???=????????=?????

Gram Reoti, Behind Aurobindo Hospital, Sanwer Road,Indore(M.P.) Ph: 6684190 18


Computer Graphics and Multimedia
BCA VI SEM

??=??????=????????XkHNI ???=????????=???????????=????=?
??=????????????=?
???=???=?
???????=
??dupper ???dlower?

Algorithm:(here m<1)

Step 1: f????=???=???=????=?????????=???=?????=???=????=????????=??E?MI?MF
Step 2: i ???=E=?MI?MF=????=???=?????=??????X=????=??=I=????=???=?????=??????
Step 3: ?????????=?????????∆?I ∆?IO∆?=???=O∆?=JO∆?=I=???=??????=???=????????=?????=???=???=
????????=?????????=??W
p0 = 2 ∆y – ∆x
Step 4 : ???=????=??I=???=????=?????=???=????=I=????????=??=??MI=???????=???=?????????=????W
f?=??Y=M=I=???=????=?????=?
?=????=??=E?? H=N=I?? F=???
pk+1 = pk + 2 ∆y
l ????????I=???=????=????? =??=????=??=E?? H=NI=?? HNF=???
pk+1 = pk + 2 ∆y – 2 ∆x
Step 5: o ?????=????=?∆?=??????

Gram Reoti, Behind Aurobindo Hospital, Sanwer Road,Indore(M.P.) Ph: 6684190 19


Computer Graphics and Multimedia
BCA VI SEM

Example:
i ??=??=????=???=?????????=??=?=????=??=EOMI=NMF=???=EPMINUF
q ???=????=???=?=?????=??=M?U=????=∆??NM=???=∆??U
q ??=???????=????????=?????????=???=???=?????=
p0 = 2 ∆y – ∆x
=6
???=???=??????????=???=???????????=??????????=????????=??????????=???=
2∆y =16 2 ∆y – 2∆x=-4
t ?=????=???=???????=?????=E?MI?MF?EOMINMFI=???=?????????=??????????=?????=????????=?????=???=????=
????=????=???=????????=?????????=??
K Pk (xk+1,yk+1) K Pk (xk+1,yk+1)
0 6 (21,11) 5 6 (26,15)
1 2 (22,12) 6 2 (27,16)
2 -2 (23,12) 7 -2 (28,16)
3 14 (24,13) 8 14 (29,17)
4 10 (25,14) 9 10 (30,18)

Difference Between DDA Line and Bresenham’s Line Drawing Algorithm.


Digital Differential Analyzer ??????????=i ???=a ??????=?????????
i ???=a ??????=?????????

Arithmetic a a ?=?????????=????floating ??????????=?????????=????fixed


points ??
??Real Arithmetic? points ??
??Integer Arithmetic?

Operations a a ?=?????????=????multiplication ???= ??????????=?????????=????=


division ??=???=??????????? ????subtraction ???addition ??=?
??=
???????????

Speed a a ?=?????????=??=??????slow??=????= ??????????=?????????=??=??????=????=a a ?=


??????????=?????????=??=????=???????= ?????????=??=????=???????=???????=??=
???????=??=????=????=??????????=E????????J ????????=????=????????=???=???????????=??=
?????=??????????F? ???=???????????=???=????=????=???????=
??????????=??=??=????=?????????????faster?

Accuracy & a a ?=?????????=??=???=??=????????=???= ??????????=?????????=??=????=?????????=


Efficiency ?????????=??=?????????=?????????? ???=????=????????=????=a a ?=??????????

Drawing a a ?=?????????=???=????=???????=???= ??????????=?????????=???=????=???????=

Gram Reoti, Behind Aurobindo Hospital, Sanwer Road,Indore(M.P.) Ph: 6684190 20


Computer Graphics and Multimedia
BCA VI SEM

??????=???=????=???=???=??=????????=??= ???=??????=????=????=????=????????=????=
??????????=?????????? a a ?=??????????

Round Off a a ?=?????????=?????=???=???=???????????= ??????????=?????????=????=???round


??=???????=????=??=???????=??=???=????? off ???=?????=???=???????????=?????=??=???=
??????????

Expensive a a ?=????????? ????=??=????????=??????= ??????????=?????????=??=????=?????????=


??=????????J?????=????????
???????=??=??=??= ????=a a ?=?????????=??=??=????=????=
?????????? ????????=???=????????????

Circle Generation Algorithm: a ??????=?=??????=??=???=??????=??=?=??????=???????=????=???????=?=


?????
=q ????=???=???=???????=??????????=???=??????????=?=??????=Bresenham’s Algorithm ???=
Midpoint Circle Algorithm? =q ????=??????????=???=?????=??=???=????=??=???????????=???=
??????????=??????=????????=??=????=???=???????
=

q ??=????????=??=??????=??XOHYO?rOIu OHv O??OI ?????=?=??=???????

1) Bresenham Circle Drawing Algorithm: t ?=??????=???????=?=??????????=???=??=???=??????=


????????=f??????I=??=????=??=??????=???=???????=?????=????????=??=????????=???=????
c ???=???=?????????=????????????I=??=???=???=????=??=????=???=???=?????=??=Eu I=v F=????????=???=
???=????=??=??????=?????=??=???=???=????=?? ???=−=??=k =Eu HNI=v F=??=??=p=Eu HNI=v JNF?

Gram Reoti, Behind Aurobindo Hospital, Sanwer Road,Indore(M.P.) Ph: 6684190 21


Computer Graphics and Multimedia
BCA VI SEM

q ???=???=??=???????=??=???=????????=?????????d?
∑ f? =?=Y?=MI=????=k Eu HNI=v F=??=??=??=??????=??=????=??????
∑ f? =?=[ =MI=????=pEu HNI=v JNF=??=??=??=??????=??=???=????=??
????

i ??==u ?=???=v ?=??????=???=?=???????????=???=?=???????????=??=???=??????=??=???=


??????? =o =??=???=???????=
Step 1: p??=u =?=M=???=v =?=o =
Step 2: p??=a =?=P=?Oo =
Step 3: o ?????=t ????=Eu =Y=v F=
Step 4: ????=a ???=??????Eu ?I=v ?I=u I=v F=
Step 5: p??=u =?=u =H=N=
Step 6: f?=Ea =Y=MF=q ???=
Step 7: a =?=a =H=?u =H=S=
Step 8: b ???=
Step 9: p??=v =?=v =?N=
Step 10: a =?=a =H=?Eu =?v F=H=NM=
xb ??=??=f?z=
Step 11:????=a ???=??????Eu ?I=v ?I=u I=v F=
xb ??=??=t ????z=
Step 12: b ???
Draw Circle (Xc, Yc, X, Y):
Step 1 : ????=m??m? ???Eu ?=H=u I=v ?I=H=v F=
Step 2: ????=m??m? ???Eu ?=J u I=v ?I=H=v F=
Step 3: ????=m??m? ???Eu ?=H=u I=v ?I=J v F=
Step 4: ????=m??m? ???Eu ?=J u I=v ?I=J v F=
Step 5: ????=m??m? ???Eu ?=H=v I=v ?I=H=u F=
Step 6: ????=m??m? ???Eu ?=J v I=v ?I=H=u F=
Step 7: ????=m??m? ???Eu ?=H=v I=v ?I=J u F=
Step 8: ????=m??m? ???Eu ?=J v I=v ?I=J u F=

Gram Reoti, Behind Aurobindo Hospital, Sanwer Road,Indore(M.P.) Ph: 6684190 22


Computer Graphics and Multimedia
BCA VI SEM

Step 9: b ???
2) Mid-Point Circle ( Xc, Yc, R):
i ??==u ?=???=v ?=??????=???=?=???????????=???=?=???????????=??=???=??????=??=???=???????
=o =??=???=
??????? =
Step 1W =p??=u =?=M=???=v =?=o =
Step OW =p??=m=?=N=?o =
Step PW =o ?????=t ????=Eu =Y=v F=
Step ?W =????=a ???=??????Eu ?I=v ?I=u I=v F=
Step RW =p??=u =?=u =H=N=
Step SW =f?=Em=Y=MF=q ???=
Step TW =m=?=m=H=Ou =H=S=
Step UW =b ???=
Step VW =p??=v =?=v =?N=
Step NW ?=m=?=m=H=OEu =?v F=H=N=
xb ??=??=f?z=
Step NNW =????=a ???=??????Eu ?I=v ?I=u I=v F=
xb ??=??=t ????z=
Step NOW =b ??
?=

Draw Circle (Xc, Yc, X, Y):


Step NW ????=m?? m????Eu ?=H=u I=v ?I=H=v F=
Step OW =????=m??m? ???Eu ?=J u I=v ?I=H=v F=
Step PW =????=m??m? ???Eu ?=H=u I=v ?I=J v F=
Step ?W =????=m??m? ???Eu ?=J u I=v ?I=J v F=
Step RW =????=m??m? ???Eu ?=H=v I=v ?I=H=u F=
Step SW????=m?? m? ???Eu ?=J v I=v ?I=H=u F=
Step TW =????=m??m? ???Eu ?=H=v I=v ?I=J u F=
Step UW =????=m??m? ???Eu ?=J v I=v ?I=J u F=
Step VW =b ???
b ??????=??=j ??=m????=??????=a ??????=?????????W
i ??=??NM=???=?????????=?????????=?????=???=??????=??????=??=???=?????=????????=????=??M=??=????
q ??=???????=?????=??=???=????????=?????????=??=
mM=?NJ?=?JV
c ??=???=??????=????????=??=???=??????????=??????I=???=???????=?????=??=E?MI?MF?EMINMFI=???=???????=
?????????=?????=???=???????????=???=????????=??????????=???
O?M?M=I===O?M?OM
p?????????=????????=?????????=??????=???=?????????=?????=???=??????=????=???=??????????=?????=???=
???J ?????=??????=??
K Pk (xk+1,yk+1) 2xk+1 2yk+1
M JV ENINMF O OM
N JS EOINMF ? OM
O JN EPINMF S OM
P S E?IVF U NU
? JP ERIVF NM NU
R U ESIUF NO NS

Gram Reoti, Behind Aurobindo Hospital, Sanwer Road,Indore(M.P.) Ph: 6684190 23


Computer Graphics and Multimedia
BCA VI SEM

S R ETITF N? N?

Polygon Generation and Filling Algorithm:


m??????=??=??=???????=????=??=????????=??=?????=??=???=?????????=???????
=c ??=???????=????????=????=
??????????=??????I=???=????=??=?????????=???=?? ????=???????=??=???=??????=??=???=???????=???=
?????=?????=????=??????=???=???????? =f?=????=???????I=??=????=???=???=??=???=????=????????=?????=
?????????=???????????

Scan Line Algorithm


q ???=?????????=?????=??=????????????=????????=????=???????=?????=???=?????=???=???????=???????=
?????=??=??????????????
=q ??=?????????=?????=??????=???=????=?????????=??????
Step 1 −=c ???=???=???=v ???=???=v ???=????=???=?????=????????

Step 2 −=p???i ???=??????????=????=????=????=??=???=???????=????=v ???=??=v ???? =k ???=????=


????????????=?????=??=???=???????? =??=???=???=??????=?????=?????I=????=???=?????=??=?MI=?NI=?OI=
?P?
Step 3 −=p??????=????????????=?????=??=???=??????????=?????=??=u =??????????=?? ??=E?MI=?NFI=E?NI=
?OFI=???=E?OI=?PF?
Step 4 −=c ???=???=?????=????=??=???????????=????=???=??????=????????=???=??????=???=?????????=??????

Gram Reoti, Behind Aurobindo Hospital, Sanwer Road,Indore(M.P.) Ph: 6684190 24


Computer Graphics and Multimedia
BCA VI SEM

Flood Fill Algorithm


p????????=??=????=??????=??=??????=?????=??=????=??=????=???=????=???=???=????????=????=
?????????=??????? =t ?=???=?????=????=???????=????=?=?????????=????????=?????=???????=??=?????????=
???=??????????=????????=?????=??=??=????????=???????=??????????
f??????=??=???????=??=???=????????=??=???=??????I=??=??????=??=???=????=?????? =f?=?????=?????I=??=
????????=???=????????=?????=??=???=??????=????=???=????=??????
=t ???=??=????=??????=??=???=????????=
????????=?????=?????I=???=?????????=??=??????????
l ???=?????I=????=?????????=??????=??=???=c ???J???????=??=b ????J???????=??????=??=???????=??=???=
???????=???=???????=??=???????=???=???=????????=?????I=??=??=???????=???=???=????????=??????=????=???=
?=????=??=???=?????????

Boundary Fill Algorithm


q ??=????????=????=?????????=?????=??=???=????? =q???=?????????=?????=?=??? ??=??????=??=??????=???=
??????=??=????=?????=??=????=?
??=????????=??=???=???????
=q ??=?????=??=???=????????=???=???=?????=????=
??=????=??????=??=?????????=???=????=?????????=??=?????
f?=????=?????????I=??=??????=????=?????=??=???=????????=??=????=???=???=??????=??????? =q ??=
????????=????=?????????=???=??=???????????=??=?J?????????=??????=??=UJ?????????=???????
4-Connected Polygon
f?=????=?????????=?J?????????=??????=???=????=??=?????=??=???=??????? =t ?=???=???????=???=??????=
?????I=?????I=??=???=?????I=???=??=???=????=????=??=???=???????=??????=???=????=???????=????=????????=
?????=??=????=?=????????=????=?????????=??????

Gram Reoti, Behind Aurobindo Hospital, Sanwer Road,Indore(M.P.) Ph: 6684190 25


Computer Graphics and Multimedia
BCA VI SEM

Algorithm
Step 1 −=f?????????=???=?????=??=????=?????=E?????I=?????FI=??????=???=?????
Step 2 −=a ?????=???=????????=??????=??=???=????????
Step 3 −=?????=??=???=???????=????=?????=??=??=???????=?????I=????=??????=???=?????=?=???=R=????=???=
????????=??????=????????
f?????????E?I ?F?????=??????????=????=????R
Step 4 −=??????=???=???????=?????=????=???=????=?????=??=???=????=??????
???m????E?????I=?????I=????F
Step 5 −=o ??????????=??????=???=?????????=????=????=????????????=???????
c ????c ???=E?????=?NI=?????I=????I=????F
c ????c ???=E?????=H=NI=?????I=????I=????F
c ????c ???=E?????I=?????=J NI=????I=????F
c ????c ???=E?????=?NI=?????=H=NI=????I=????F
Step 6 −=b ???
q ????=??=?=???????=????=????=??????????
=????????=???=????=??=?????=?????=?????=??=?????=??=????=
???=??????=???????=e ???I=???=?????=??=??????=????=??????????
=f?=????=?????I=?J?????????=??????=
?????????=??????=??=?????

Gram Reoti, Behind Aurobindo Hospital, Sanwer Road,Indore(M.P.) Ph: 6684190 26


Computer Graphics and Multimedia
BCA VI SEM

8-Connected Polygon
f?=????=?????????=UJ?????????=??????=???=????=??=?????=??=???=??????? =t ?=???=???????=??????=
?????I=?????I=?????=???=????=????=??=???=???????=??????=??=??=????=?????=??=?J?????????=
??????????
f?=????????=??=????I=??=???=????=???????=??????=??=??
???????=??=????=??????=????=??=???=???????=?????
=
??=????????=q ???=???????=????=????????=?????=??=????=?=????????=????=?????????=??????

Algorithm
Step 1 −=f?????????=???=?????=??=????=?????=E?????I=?????FI=??????=???=?????
Step 2 −=a ?????=???=????????=??????=??=???=????????
Step 3 −=?????=??=???=???????=????=?????=??=??=???????=?????=????=??????=???=?????=?=???=R=????=???=
????????=??????=???????
f?=????????E?I?F=?=????=????=??????=????=?=???=R
Step 4 −=??????=???=???????=?????=????=???=????=?????=??=???=????=??????
???m????E?????I=?????I=????F
Step 5 −=o ??????????=??????=???=?????????=????=????=?????????????=??????
c ????c ???=E?????=?NI=?????I=????I=????F

Gram Reoti, Behind Aurobindo Hospital, Sanwer Road,Indore(M.P.) Ph: 6684190 27


Computer Graphics and Multimedia
BCA VI SEM

c ????c ???=E?????=H=NI=?????I=????I=????F
c ????c ???=E?????I=?????=J NI=????I=????F
c ????c ???=E?????I=?????=H=NI=????I=????F
c ????c ???=E?????=?NI=?????=H=NI=????I=????F
c ????c ???=E?????=H=NI=?????=H=NI=????I=????F
c ????c ???=E?????=H=NI=?????=J NI ????I=????F
c ????c ???=E?????=?NI=?????=J NI=????I=????F
Step 6 −=b ???
q ??=?J?????????=?????=?????????=??????=??=????=???=????=??=??????=??=???=?????????=??????=?????=
?????=??????=????=???=UJ?????????=??????????

Anti Aliasing: f?????????????????I antialiasing ??=??????????????????=???=


???????????jaggies J ?????????J????=?????=????=??????=??=???????
=g??????=?????=???????=?????????
??????I=???????????????????I=?????D ?=????=?=????==??????????????????=?????????=?=??????=?????=
????????????=???????=???=??????????=??=???????=??=???????????=???=??????????=????=????????????=
??????=??=????=E???????J??????????????F=??=?????=E???=?????=???????F?=????????=????=???????=???=
??????=??????????=??=???=?????I=??=????=?????=????=????????=???????=??????=???=????????=???????
??=??????smoothingI=??=?????=???=???????=???????=???=????=???=??????????=?????????=????????=
????=??????=?????????
????????????=??=?????????=??????oversampling.

Transformations ???=???=??=???=???????????=??????????=????=???=?????????=??=????????=????????? =
f?=??=?????=????????=????=??????=??=???????=??=???=??????????=??????=???=??=??????=??=???????=??=
????=?????=??????????=??????? =q ??????????????=???=????==??????=??=??????????
=f?=????????=
????????=??=?????=???????=??=?????????=???=???????????=??=??=??????=E????????I=???????????=???=
????F? =l ??=???=????=??????==??????????????=??=???=?????????????=????W

Gram Reoti, Behind Aurobindo Hospital, Sanwer Road,Indore(M.P.) Ph: 6684190 28


Computer Graphics and Multimedia
BCA VI SEM

(i) Geometric transformation: l ?????=??????????????=?????=?????=??=??????????=??????????=


??????????=??????=??=???????????
(ii) Coordinate transformation: f?=????=????=?????I=??????????=??????=??=???????????=???????=??=
???????
q ?????????????=?????=????????=????=????????=????=?????????=????=??=????????=?????? =t ?=???=
????=???????=?????=??=???????????????=????=??=???????????I=???????=??=??=????I=????????I=????????I=
????=t ???=?=??????????????=?????=?????=??=?=Oa =?????I=??=??=??????=Oa =???????????????
q ??????????????=????=??=?????????=????=??=????????=????????=??=??????????=???=????????=??=???=
??????=???=??????=?????=????=??=????????????

Homogenous Coordinates
q ?=???????=?=????????=??=??????????????=????=??=???????????=????????=??=????????=???=???????I=
??=????=??=??????=?=??????????=???????=−
∑ q? ???????=???=???????????I
∑ o ?? ???=???=??????????=???????????I=???=????
∑ p??? ?=???=???????=???????????=??=????????=???=?????????=???????????????
q ?=???????=????=???????I=??=????=??=???=P?P=??????????????=??????=???????=??=O?O=??????????????=
???????=q ?=???????=?=O?O=??????=??=P?P=????? ?I=??=????=??=???=??=?????=?????=??????????=t ?
f?=? ???=???I=??=???=?????????=? ??=?????=??=P=???????=? ??????=??=O=???????I=?????=? ?=
??????Homogenous Coordinate ??????? =f?=????=??????I=??=???=?????????=???=???=??????????????=
?????????= ??= ?????
?= ???????????????= ???= ?????????= ?????= mEu I= v F= ???= ??= ?????????= ??=
??????????=???????????=??=m?=Eu ?I=v ?I=?F?

Translation
?=???????????=?????=??=??????=??=?=?????????=????????=??=???=???????
=v ??=???=?????????=?=?????=??=
Oa =??=??????=???????????=??????????=E? ?I=?
?F=?
?=???=????????=??????????=Eu I=v F=??=???=???=???=
??????????=Eu ?I=v ?F?

Gram Reoti, Behind Aurobindo Hospital, Sanwer Road,Indore(M.P.) Ph: 6684190 29


Computer Graphics and Multimedia
BCA VI SEM

c ???=???=?????=??????I=??????=?????=????=−
X’ = X + tx
Y’ = Y + ty
q ??=????=E??I=??F=??=??????=???=???????????=??????=??=?????=??????? =q ??=?????=?????????=???=????=??=
???????????=?????=???=??????=????????
P?xXzxYzm?xu zxv z ?D =?xX′zxY′zxu ′zxv ′zq =?xtxzxtyzx?
?zx??z
t ?=???=?????=??=??=−
P’ = P + T
Rotation
f?=????????I=??=??????=???=??????=??=??????????=?????=θ=E?????F=????=???=???????=c ???=???=?????????=
??????I=??=???=???=????=???=?????=mEu I=v F=??=???????=??=?????=φ=????=???=??????????=u =??????????=
????=????????=?=????=???=???????
i ??=??=???????=???=????=??=??????=??=??=???=?????=θ? =?????=????????=??=??=?=???=????????I=???=????=
???=?=???=?????=m?=Eu ?I=v ?F?

Gram Reoti, Behind Aurobindo Hospital, Sanwer Road,Indore(M.P.) Ph: 6684190 30


Computer Graphics and Multimedia
BCA VI SEM

r ????=????????=?????????????=???=????????=??????????=??=?????=mEu I=v F=???=??=???????????=??=−


X?rcosϕ? ??
??
?ENFu ?????ϕ? ?
???
?ENF
Y?rsinϕ? ??
??
?EOFv ?????ϕ???
???
EOF
p???=???=??=???=?????????=???=?????=m?=Eu ?I=v ?F=??=−
x′?rcosEϕHθF?rcosϕcosθ−rsinϕsinθ? ?
??
??EPF?′?????EϕHθF?????ϕ???θ−????ϕ???θ?
? ?
???
??EPF
y′?rsinEϕHθF?rcosϕsinθHrsinϕcosθ? ?
??
??E?F?′?????EϕHθF?????ϕ???θH????ϕ???θ?
? ???
??
?E?F
p????????
???=????????=ENF=C =EOF=??=EPF=C =E?F=????????????I=??=????=???
x′?xcosθ−ysinθ?′?????θ−????θ
y′?xsinθHycosθ?′?????θH????θ
o ???????????=???=?????=????????=??=??????=????I
xX′Y′z?xX′Y′zxcosθ−sinθsinθcosθzORxu ′v ′z?xu ′v ′zx???θ???θ−???θ???θzl o
m?=?=m=?
=o
t ????=o =??=???=????????=??????
R?xcosθ−sinθsinθcosθzo ?x???θ???θ−???θ???θz
q ??=????????=?????=???=??=????????=???=?????????
c ??=????????=????????=?????I=??=???=???=???=?????=????????=?????
??=e ??????I=???=????????=?????=
????????I=???=??????=????=??????=??=?????=?????=−


R?xcosE−θF−sinE−θFsinE−θFcosE−θFzo ?x???E−θF???E−θF−???E−θF???E−θFz

?xcosθsinθ−sinθcosθzE cosE−θF?cosθandsinE−θF?−sinθF?x???θ−???θ???θ???θzE ???E−θF????θ??
????E−θF?−???θF

Gram Reoti, Behind Aurobindo Hospital, Sanwer Road,Indore(M.P.) Ph: 6684190 31


Computer Graphics and Multimedia
BCA VI SEM

Scaling
q ?=??????=???=????=??=??=??????I=???????=??????????????=??=????? =f?=???=???????=???????I=???=??????=
??????=??=????????=???=??????????=??=???=??????? =p??????=???=??=????????=??=???????????=???=
????????=???????????=??=???=??????=????=???=???????=??????=??=???=???=???????=???????
i ??=??=??????=????=???=????????=??????????????=Eu I=v FI=???=???????=???????=???=Ep u I=p v FI=???=???=
????????=???????????=???=Eu ?I=v ?F?=q ???=???=??=??????????????=???????????=??=?????=?????=−
X' = X . SX and Y' = Y . SY
q ??=???????=??????=p u I=p v ??????=???=??????=??=u =???=v =?????????=?????????????
=q ??=?????=
?????????=???=????=??=???????????=??=??????=????=??=?????=−
EX′Y′F?EXYFxSxMMSyzEu ′v ′F?Eu v Fxp?MMp?z
l o
P’ = P . S
t ????=p=??=???=???????=???????
=q ??=???????=???????=??=?????=??=???=?????????=???????

Gram Reoti, Behind Aurobindo Hospital, Sanwer Road,Indore(M.P.) Ph: 6684190 32


Computer Graphics and Multimedia
BCA VI SEM

f?=??=???????=??????=????=????=N=??=???=???????=??????=pI=????=??=???=??????=???=????=??=??????????
=
f?=??=???????=??????=???????=????=NI=????=??=???=????????=???=????=??=???=???????

Reflection
o ?????????=??=???=??????=?????=??=????????=??????? =f?=?????=?????I=??=???=???=????=??=??=?=????????=
?????????=????=NUM?? =f?=??????????=??????????????I=???=????=??=???=??????=????=???=???????
q ??=?????????=???????=????=???????????=????=???????=??=u =???=v =????I=???=?????=???=??????=
?????????????

Gram Reoti, Behind Aurobindo Hospital, Sanwer Road,Indore(M.P.) Ph: 6684190 33


Computer Graphics and Multimedia
BCA VI SEM

Shear
?=??????????????=????=??????=???=?????=??=??=??????=??=??????=???=?????=???????????????
=q ????=???=
???=?????=???????????????X-Shear ???Y-Shear? =l ??=??????=u =???????????=??????=???=?????=
??????=v =??????????=??????? =e ??????X=? ?=????=? ??=?????=????=???=??????????=???????=? ??=
???????????=???=?????=?????????=???=???????
=p???????=??=????=??????=??Skewing?
u Jp????
q ??=u Jp????=?????????=???=v =??????????=???=???????=???=????=??=u =???????????I=?????=??????=
???=????????=?????=??=????=?????=??=????=??=?????=??=?????=???????

Gram Reoti, Behind Aurobindo Hospital, Sanwer Road,Indore(M.P.) Ph: 6684190 34


Computer Graphics and Multimedia
BCA VI SEM

q ??=??????????????=??????=???=u Jp????=???=??=???????????=??=−
Xsh?⎡⎣⎢NshxMMNMMMN⎤⎦⎥u ???xNMM???NMMMNz
uD=?=u =H=p?? ?
=v
v ?=?=v
Y-Shear
q ??=v Jp????=?????????=???=u =???????????=???=???????=???=v =???????????=?????=??????=???=
??????????=?????=??=?????????=????=?????=?????=??????=??=??=????=??=?????=??=???=?????????=
???????

q ??=v Jp????=???=??=???????????=??=??????=????=??=−
Ysh⎡⎣⎢NMMshyNMMMN⎤⎦⎥v ??xN???MMNMMMNz
v ?=?=v =H=p?? ?
=u

Gram Reoti, Behind Aurobindo Hospital, Sanwer Road,Indore(M.P.) Ph: 6684190 35


Computer Graphics and Multimedia
BCA VI SEM

u ?=?=u
Composite Transformation
f?=?=??????????????=??=???=?????=q N=??=????????=??=?=??????=?????=??????????????=q OI=????=???=
??????=??????=???=??=???????????=??=?=??????=??????????????=q =?????=??=???=???????????=??=q N=???=
q O=?????=??=????=??????
=q ???=??=???????=??=q =?=q N∙q O?
?????????=??????????????=???=??=????????=??=?????????????=??=??????????????=????????=??=
??????=?=????????=??????????????=???????
?=????????=??????=−
[T][X] = [X] [T1] [T2] [T3] [T4] …. [Tn]
t ????=xq ?z=??=???=???????????=??
∑ q? ?????????
∑ p??? ???
∑ p???? ???
∑ o ?? ?????
∑ o ?? ???????
q ??=??????=??=???=?????=??=??????????????=?????=????=??=?????????=???????I=??=??=???????=??????=
??????????????=??=???=??????????I=????=??=x?z=?
=x?z=≠=x?z=?
=x?z=???=???=?????=??=???????????????
=q ??=
?????=???????=??=?????????=???????????????=??=??=????=??????????=??=????????=?=??????=????????=
??????????????=??=?=?????I=??????=????=????????=?=??????=??=??????????????I=???=?????=????????
c ??=???????I=??=??????=??=??????=?????=??=?????????=?????=Eu ?I=v ?FI=??=????=??=?????=???=?????=
?????=−
∑ q? ???????=?????=Eu ?I=v ?F=??=???=???????
∑ o ?????=??=?????=???=???????
∑ c? ?????I=?????????=???=??????=??=????????=????=?????=??=?????????

Gram Reoti, Behind Aurobindo Hospital, Sanwer Road,Indore(M.P.) Ph: 6684190 36

You might also like