0% found this document useful (0 votes)
2 views

cg...

The document discusses various applications of computer graphics, including computer art, computer-aided drawing, presentation graphics, entertainment, education, training, visualization, and image processing. It also explains different display technologies such as random scan and raster scan displays, along with their advantages and disadvantages. Additionally, it covers LCD technology, its types, and algorithms like Bresenham's circle drawing and DDA for line generation.

Uploaded by

Dipti Ghule
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

cg...

The document discusses various applications of computer graphics, including computer art, computer-aided drawing, presentation graphics, entertainment, education, training, visualization, and image processing. It also explains different display technologies such as random scan and raster scan displays, along with their advantages and disadvantages. Additionally, it covers LCD technology, its types, and algorithms like Bresenham's circle drawing and DDA for line generation.

Uploaded by

Dipti Ghule
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 17

Computer Graphics

Application of computer Graphics


Computer graphics deals with creation, manipulation and storage of different type of
images and objects. Some of the applications of computer graphics are:
1. Computer Art: Using computer graphics we can create fine and commercialart
which include animation packages, paint packages. These packages provide
facilities for designing object shapes and specifying object motion.Cartoon
drawing, paintings, logo design can also be done
2. . Computer Aided Drawing: Designing of buildings, automobile, aircraft is
donewith the help of computer aided drawing, this helps in providing minute
details to the drawing and producing more accurate and sharp drawings with
better specifications.
3. Presentation Graphics: For the preparation of reports or summarising the
financial, statistical, mathematical, scientific, economic data for research
reports, managerial reports, moreover creation of bar graphs, pie charts, time
chart, can be done using the tools present in computer graphics.
4. Entertainment: Computer graphics finds a major part of its utility in the
movieindustry and game industry. Used for creating motion pictures , music
video, television shows, cartoon animation films. In the game industry where
focus and interactivity are the key players, computer graphics helps in
providing such features in the efficient way.
5. Education: Computer generated models are extremely useful for
teachinghuge number of concepts and fundamentals in an easy to understand
and learn manner. Using computer graphics many educational models can be
created through which more interest can be generated among the students
regarding the subject.
6. Training: Specialised system for training like simulators can be used fortraining
the candidates in a way that can be grasped in a short span of time with
better understanding. Creation of training modules using computer graphics is
simple and very useful.
7. Visualisation: Today the need of visualise things have increased drastically,
theneed of visualisation can be seen in many advance technologies , data
visualisation helps in finding insights of the data , to check and study the
behaviour of processes around us we need appropriate visualisation which
can be achieved through proper usage of computer graphics
8. Image Processing: Various kinds of photographs or images require editing
inorder to be used in different places. Processing of existing images into
refined ones for better interpretation is one of the many applications of
computer graphics.
Random Scan Display:
Random Scan System uses an electron beam which operates like a pencil to
create a line image on the CRT screen. The picture is constructed out of a
sequence of straight-line segments. Each line segment is drawn on the screen
by directing the beam to move from one point on the screen to the next, where
its x & y coordinates define each point. After drawing the picture. The system
cycles back to the first line and design all the lines of the image 30 to 60 time
each second. The process is shown in fig:

Random-scan monitors are also known as vector displays or stroke-writing


displays or calligraphic displays.

Advantages:

1. A CRT has the electron beam directed only to the parts ofthe screen where
an image is to be drawn.
2. Produce smooth line drawings.
3. High Resolution

Disadvantages:

1. Random-Scan monitors cannot display realistic shades scenes.

Raster Scan Display:

A Raster Scan Display is based on intensity control of pixels in the form of a


rectangular box called Raster on the screen. Information of on and off pixels is
stored in refresh buffer or Frame buffer. Televisions in our house are based on
Raster Scan Method. The raster scan system can store information of each pixel
position, so it is suitable for realistic display of objects. Raster Scan provides a
refresh rate of 60 to 80 frames per second.

Frame Buffer is also known as Raster or bit map. In Frame Buffer the positions
are called picture elements or pixels. Beam refreshing is of two types. First is
horizontal retracing and second is vertical retracing. When the beam starts from
1. It has high Resolution 1. Its resolution is low.

2. It is more expensive 2. It is less expensive

the top left corner and reaches the bottom right scale, it will again return to the
top left side called at vertical retrace. Then it will again more horizontally from
top to bottom call as horizontal retracing shown in fig:

Types of Scanning or travelling of beam in Raster Scan

1. Interlaced Scanning
2. Non-Interlaced Scanning

In Interlaced scanning, each horizontal line of the screen is traced from top to
bottom. Due to which fading of display of object may occur. This problem can
be solved by Non-Interlaced scanning. In this first of all odd numbered lines are
traced or visited by an electron beam, then in the next circle, even number of
lines are located.

For non-interlaced display refresh rate of 30 frames per second used. But it gives
flickers. For interlaced display refresh rate of 60 frames per second is used.

Advantages:

1. Realistic image
2. Million Different colors to be generated
3. Shadow Scenes are possible.

Disadvantages:

1. Low Resolution
2. Expensive

Differentiate between Random and Raster Scan Display:


3. Any modification if needed is easy 3.Modification is tough

4. Solid pattern is tough to fill 4.Solid pattern is easy to fill

5. Refresh rate depends or 5. Refresh rate does not depend on the


resolution picture.

6. Whole screen is scanned.


6. Only screen with view on an area is
displayed.

7. Beam Penetration technology come under 7. Shadow mark technology came under
it. this.

8. It uses interlacing
8. It does not use interlacing method.
9. It is restricted to line drawing applications
17

Direct View Storage Tubes:


It is suitable for realistic display DVST terminals also use the random scan approach
to generate the image on the CRT screen. The term "storage tube" refers to the
ability of the screen to retain the image which has been projected against it, thus
avoiding the need to rewrite the image constantly.

Function of guns: Two guns are used in DVST

1. Primary guns: It is used to store the picture pattern.


2. Flood gun or Secondary gun: It is used to maintain picturedisplay.

Advantage:
1. No refreshing is needed.
2. High Resolution
3. Cost is very less

Disadvantage:

1. It is not possible to erase the selected part of a picture.


2. It is not suitable for dynamic graphics applications.
3. If a part of picture is to modify, then time is consumed.

Cathode Ray Tube (CRT):


18

CRT stands for Cathode Ray Tube. CRT is a technology used in


traditional computer monitors and televisions. The image on CRT
display is created by firing electrons from the back of the tube of
phosphorus located towards the front of the screen. Once the electron
heats the phosphorus, they light up, and they are projected on a
screen. The color you view on the screen is produced by a blend of
red, blue and green light.

Components of CRT: Main Components of CRT are:

1. Electron Gun: Electron gun consisting of a series of


elements,primarily a heating filament (heater) and a cathode. The
electron gun creates a source of electrons which are focused into a
narrow beam directed at the face of the CRT.

2. Control Electrode: It is used to turn the electron beam on


andoff.

3. Focusing system: It is used to create a clear picture byfocusing


the electrons into a narrow beam.

4. Deflection Yoke: It is used to control the direction of the


electronbeam. It creates an electric or magnetic field which will bend the
electron beam as it passes through the area. In a conventional CRT, the
yoke is linked to a sweep or scan generator. The deflection yoke which is
connected to the sweep generator creates a fluctuating electric or magnetic
potential.
19

Difference between 2D and 3D

Basis of
2D Animation 3D Animation
Difference

Objects are in form of two


Objects have 3 dimensions X, Y,
Representation dimensions as X and Y
and Z axis.
axis.

The flat image depends Looks like a realistic image and is


Structure
on frames. animated as movements.

Uses traditional methods


Uses sketching, modeling, vector
Implementation (painting and sketching)
representation, texturing, wrapping,
methods and now software for
etc.
rendering.

Lower when compared to


Cost Higher cost than 2D applications.
3D.

Advanced features like texture,


2D application software
lighting, shadowing, etc are added
Software has fewer features so can
to make objects livelier and this
features be learned easily by the
takes more time to become an
animator.
expert in 3D modeling.

Needs less time as the Takes more time to create,


Creation time application supports animate, specify transition effects,
minimal features. and execute.

Presentations, online
marketing platforms, TV shows, Cartoons, video games,
Used for
commercial websites, Disney movies, etc.
advertisements, etc.

Adobe Photoshop,
Blender, Daz Studio, ZBrush,
Software’s used PicsArt, Toon Boom
Autodesk Maya
Studio
20

Looney Toons, The Lion


Few popular Mickey Mouse Clubhouse, Toy
King, Jungle Book, Super
examples Story, Call of Duty, and much more
Mario games, etc.

What is LCD?
LCD is a flat display technology, stands for "Liquid Crystal Display," which is
generally used in computer monitors, instrument panels, cell phones, digital
cameras, TVs, laptops, tablets, and calculators. It is a thin display device that offers
support for large resolutions and better picture quality. The older CRT display
technology has replaced by LCDs, and new display technologies like OLEDs have
started to replace LCDs. An LCD display is most commonly found with Dell laptop
computers and is available as an active-matrix, passive-matrix, or dual-scan display.
The picture is an example of an LCD computer monitor.

The LCD displays are not only different in terms of heavy than CRT monitors; even
the process of working of them is also different. An LCD contains a backlight rather
than the firing electrons at a glass screen, which offers light to individual pixels
arranged in a rectangular grid. All pixels have a sub-pixel, red, green, and blue,
which can be turned on or off. The display appears black if all of a pixel s sub-pixels
are turned off and appears white if all the sub-pixels are turned on 100%. The
millions of color combinations can be possible with the help of adjusting the
individual levels of red, green, and blue light.

As compared to CRT technology, LCD consumed much less power and allowed
displays to be much thinner that also made them very less heavy. Instead of
emitting light, LCDs work on the principle of blocking light. In an LCD, where an LED
ejects light, the liquid crystals produce a picture with the help of using a backlight.
Also, while comparing with gas-display and LED displays, LCDs consume less energy.

Different Types of LCD


There are various kinds of LCD, which are discussed below:
1. Twisted Nematic (TN): The TN LCDs are very common thatare used in several
types of displays over the industries, which led to its production much
frequently. As compared to other displays, these displays are inexpensive
and have high response times; therefore, these are most commonly used by
gamers. These displays are more appropriate for daily operations, but they
21

have low contrast ratios, viewing angles, and reproduction of color. These
displays are available with 240 hertz (Hz) as these are the only gaming
displays.
2. In-Plane Switching (IPS): In Panel Switching displays givebetter picture
quality, vibrant color precision & difference while comparing with TN LCDs.
Graphic designer and some other applications commonly use these displays;
hence, these are considered to be the best LCD.
3. Vertical Alignment Panel (VA Panels): The vertical alignment panels are
considered to deliver the medium quality between in-plane switching panel
and Twisted Nematic technology. As compared to TN-type displays, this kind
of panel has color reproduction with higher quality as well as best viewing
angles features. Also, these panels are much sufficient for daily use and more
reasonable, but these contain a low response time. As compared to the
Twisted Nematic display, these panels generate deeper blacks with better
colors. While comparing with TN kind displays, numerous crystal alignments
can permit better viewing angle. Additionally, these displays are costly
comparing to other displays. Hence these come with a tradeoff.
4. Advanced Fringe Field Switching (AFFS): AFFS LCD is a topperformer and
offers an extensive choice of color reproduction. These displays provide good
image quality. Generally, these displays are most commonly used in highly
advanced applications such as viable airplane cockpits.
Bresenham’s circle drawing algorithm
 This is a circle drawing algorithm which calculates all the nearest point nearest to
circle boundary
 It is an incremental method
 It only uses integer arithmetic which makes it’s working faster as well as less
complex
 The strategy that is followed in this algorithm is to select pixel which has least
distance with true circle boundary and with then keep calculating successive
points
 This algorithm calculates location of the pixels similarly.
Algorithm
 Initialize x=0, y=r
 Calculate decision parameter D=3-2r
 If d<0 then : d=d+4x+6, xn =x+1 , yn = y
 If d>/0 then : d=d+4(x-Y)+10 , xn= x+1, yn = y-1
22

 Plot complete circle by using 8 way symmetry.

DDA Algorithm
DDA stands for Digital Differential Analyzer. It is an incremental method of
scan conversion of line. In this method calculation is performed at each step
but by using results of previous steps.

1. This method gives overflow indication when a point is repositioned.


2. It is an easy method because each step involves just two additions.

Disadvantage:
1. It involves floating point additions rounding off is done. Accumulations
of round off error cause accumulation of error.
2. Rounding off operations and floating point operations consumes a lot
of time.
3. It is more suitable for generating line using the software. But it is less
suited for hardware implementation.
4. DDA Algorithm:
5. Step1: Assign point (x1,y1)and (x2,y2)
6. Step2: find slope m=∆y/∆𝑥= y2-y1/x2-x1
7. Step3: find =∆𝑥 𝑎𝑛𝑑 = ∆𝑦
=∆𝑥 = ∆𝑦 = ∆𝑦.𝑚
𝑚
=∆𝑦 = 𝑥2 − 𝑥1/𝑦2 − 𝑦1
∆𝒙 = 𝒙𝟐 − 𝒙𝟏
∆𝑦 = ∆𝑥.𝑚
=∆𝑥 = 𝑦2 − 𝑦1/𝑥2 − 𝑥1
=∆𝒚 = 𝒚𝟐 − 𝒚𝟏
Step 4; if |∆ x| >/|∆𝑦| if |∆𝑥| < |∆𝑦|
∆𝑥 = 1 ∆𝑦 = 1
xi+1=xi+1 xi+1=xi+=∆𝑥
yi=1=yi+=∆𝑦 xi_=∆𝑦/𝑚
=yi+m∆x xi+1/m=xi+1
Yi+m*1 yi+1=yi+=∆𝑦
Yi=yi+m yi
+1=yi+1
23

Bresenham's Line Algorithm


This algorithm is used for scan converting a line. It was developed by
Bresenham. It is an efficient method because it involves only integer addition,
subtractions, and multiplication operations. These operations can be
performed very rapidly so lines can be generated quickly.
Advantage:
1.It involves only integer arithmetic, so it is simple.
2.It avoids the generation of duplicate points.
3.It can be implemented using hardware because it does not use multiplication
and division.
4.It is faster as compared to DDA (Digital Differential Analyzer) because it does
not involve floating point calculations like DDA Algorithm.
Bresenham's Line Algorithm:

Step1: Start Algorithm

Step2: (x0,y0) (x1,y1)

Step3: slope m= =∆𝑦 = y1=y0/x1-x0


∆𝑥
Check m<1, m>/1
Step4: decision parameter P=2∆𝑦 − ∆𝑥
Step5:
If m<1 if m>/1
a) P<0 a) p<0
Xi+1=xi+1 xi+1=xi
Yi+1=yi yi+1=yi+1
Pk+1 = pk+2∆𝒚 pk+1 =
pk+2∆𝒙

b) P>/0 b) p>/0
Xi+1 = xi+1 Xi+1 = xi+1
Yi+1 = yi+1 Yi+1 = yi+1
Pk+1 = pk+2∆y-2∆𝒙 Pk+1 = pk+2∆y-2∆𝒙
24

MidPoint Circle Algorithm


 It is based on the following function for testing the spatial relationship
between the arbitrary point (x, y) and a circle of radius r centered at the
origin:
 The mid point circle drawing algorithm is used to calculate all this
perameter point of circle
 In this algorithm the midpoint b/w the two pixels is calculated which
helps in calculating decision parameter .
 The value of decision parameter will decide which pixel should be chosen
only calculates the drawing the circle.

Algorithm:
 Plot intial point such that x= 0 &y=r
 Find intial decision parameter p=5/4-r
 If (p<0) : set p= p+2x+3 & yn =y, xn = x+1
 Else if (p>0): set p=p+2(x-y)+5 & yn = y-1, xn = x+1
 Plot complete circle by using 8 way symmetry
It is based on the following function for testing the spatial relationship between
the arbitrary point (x, y) and a circle of radius r centered at the origin

Introduction to the Mid-Point Ellipse Drawing


Algorithm
In computer graphics, the mid-point ellipse algorithm is an
incremental method of drawing an ellipse. It is very similar to the mid-
point algorithm used in the generation of a circle.

The mid-point ellipse drawing algorithm is used to calculate all the


perimeter points of an ellipse. In this algorithm, the mid-point between
the two pixels is calculated which helps in calculating the decision
parameter. The value of the decision parameter determines whether
the mid-point lies inside, outside, or on the ellipse boundary and the
then position of the mid-point helps in drawing the ellipse.

Advantages:
• The mid-point ellipse algorithm has simple and easy
implementation as it only includes addition operations.

Disadvantages: This algorithm is time consuming. omputer


Graphics
25

Transformation in Computer Graphics is utilized to modify the position, orientation, or size


of objects within a graphical scene. By employing mathematical operations, vertices or points in
a 3D or 2D space are manipulated to achieve the desired changes.
In this article, we cover Transformation in Computer Graphics explaining 2d Transformation,
rotation, translation, scaling, reflection, shearing and the difference between 2d and 3d
Transformation.
What is 2d Transformation in Computer Graphics?
2d Transformation in Computer Graphics is utilized to modify the position, orientation, or
size of objects within a two-dimensional space. These transformations involve applying
mathematical operations to the coordinates of points or vertices in order to achieve the desired
changes.
These transformations can be applied in a sequence to achieve more complex effects. For
example, a combination of translation, rotation, and scaling operations can be used to animate an
object’s movement, rotation, and resizing in a 2D animation.
The various 2d Transformation in Computer Graphics examples include object manipulation,
computer-aided design (CAD), image processing, and graphical user interfaces (GUIs). By
manipulating the position, orientation, and size of objects within a 2D space, these
transformations enable a wide range of visual effects and graphical applications.
The fundamental geometrical 2d Transformation in Computer Graphics include:
• Rotation
• Translation
• Scaling
The derived geometrical 2d Transformation in Computer Graphics are:
• Reflection
• Shearing

2D Rotation in Computer Graphics


2D rotation is a fundamental concept that involves changing the orientation of an object or a
coordinate system in a 2D plane. It enables us to rotate graphical elements around a specified
point or axis by a certain angle.
In matrix form, the above equation can be represented as follows:

P′ = P . R
2D Translation
2D Translation is a transformation technique that changes the position of each point in
an object or a coordinate system by a specified distance in the x and y axes.
Applying 2D translation, we can say:
X’ = X + tx
Y’ = Y + ty
26

(tx, ty) represents the shift or the translation vector. The equations can be expressed
using column vectors for efficient representation and computation.
P=[X]/[Y] p’ = [X′]/[Y′] T = [tx]/[ty]
This can also be written as:
P’ = P + T
2D Scaling in Computer Graphics
2D Scaling in Computer Graphics involves resizing objects or coordinate systems in a
2D plane. It allows us to change the size of each point in the object or coordinate
system by applying scaling factors in the x and y directions.
To perform 2D scaling, we utilize scaling factors: sx for the x-axis and sy for the y-axis.
These factors determine how much each coordinate should be scaled along its
respective axis.
If the scaling factor (SX and SY) is greater than 1, the object is enlarged and moves
away from the origin. A scaling factor of 1 leaves the object unchanged, while a scaling
factor less than 1 shrinks the object and moves it closer to the origin.
The equations for scaling are X’ = X * SX and Y’ = Y * SY, where X and Y are the
original coordinates of a point, and X’ and Y’ are the scaled coordinates after the
transformation.
These equations can also be represented in matrix form as:

2D Reflection in Computer Graphics


2D reflection is a transformation technique that involves flipping or mirroring an object or
coordinate system across a specific axis in a 2D plane. It allows us to change the
orientation of each point in the object or coordinate system in relation to the reflection
axis.
Homogeneous Coordinates
The rotation of a point, straight line or an entire image on the screen, about
a point other than origin, is achieved by first moving the image until the point
of rotation occupies the origin, then performing rotation, then finally moving
the image to its original position.
The moving of an image from one place to another in a straight line is called
a translation. A translation may be done by adding or subtracting to each
point, the amount, by which picture is required to be shifted.
Translation of point by the change of coordinate cannot be combined with
other transformation by using simple matrix application. Such a combination
is essential if we wish to rotate an image about a point other than origin by
translation, rotation again translation.

Keyboard:
The most commonly used input device is a keyboard. The data is entered by
pressing the set of keys. All keys are labeled. A keyboard with 101 keys is
called a QWERTY keyboard.
27

1. Numeric Keys: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
2. Alphabetic keys: a to z (lower case), A to Z (upper case)
3. Special Control keys: Ctrl, Shift, Alt
4. Special Symbol Keys: ; , " ? @ ~ ? :
5. Cursor Control Keys: ↑ → ← ↓
6. Function Keys: F1 F2 F3....F9.
7. Numeric Keyboard: It is on the right-hand side of the keyboard and
used for fast entry of numeric data.
Function of Keyboard:

1. Alphanumeric Keyboards are used in CAD. (Computer Aided Drafting)


2. Keyboards are available with special features line screen co-ordinates
entry, Menu selection or graphics functions, etc.
3. Special purpose keyboards are available having buttons, dials, and
switches. Dials are used to enter scalar values. Dials also enter real
numbers. Buttons and switches are used to enter predefined function
values.
Advantage:

1. Suitable for entering numeric data.


2. Function keys are a fast and effective method of using commands, with
fewer errors.
Disadvantage:

1. Keyboard is not suitable for graphics input.


Mouse:
A Mouse is a pointing device and used to position the pointer on the screen. It
is a small palm size box. There are two or three depression switches on the
top. The movement of the mouse along the x-axis helps in the horizontal
movement of the cursor and the movement along the y-axis helps in the
vertical movement of the cursor on the screen. The mouse cannot be used to
enter text. Therefore, they are used in conjunction with a keyboard.
Spaceball:
It is similar to trackball, but it can move in six directions where trackball can
move in two directions only. The movement is recorded by the strain gauge.
Strain gauge is applied with pressure. It can be pushed and pulled in various
directions. The ball has a diameter around 7.5 cm. The ball is mounted in the
base using rollers. One-third of the ball is an inside box, the rest is outside.
Applications:

1. It is used for three-dimensional positioning of the object.


2. It is used to select various functions in the field of virtual reality.
3. It is applicable in CAD applications.
4. Animation is also done using spaceball.
5. It is used in the area of simulation and modeling.
28

Joystick:
A Joystick is also a pointing device which is used to change cursor position on
a monitor screen. Joystick is a stick having a spherical ball as its both lower
and upper ends as shown in fig. The lower spherical ball moves in a socket.
The joystick can be changed in all four directions. The function of a joystick is
similar to that of the mouse. It is mainly used in Computer Aided Designing
(CAD) and playing computer games.
Digitizers:
The digitizer is an operator input device, which contains a large, smooth board
(the appearance is similar to the mechanical drawing board) & an electronic
tracking device, which can be changed over the surface to follow existing lines.
The electronic tracking device contains a switch for the user to record the
desire x & y coordinate positions. The coordinates can be entered into the
computer memory or stored or an off-line storage medium such as magnetic
tape.

Voice Systems (Voice Recognition):


Voice Recognition is one of the newest, most complex input techniques used
to interact with the computer. The user inputs data by speaking into a
microphone. The simplest form of voice recognition is a one-word command
spoken by one person. Each command is isolated with pauses between the
words.

Voice Recognition is used in some graphics workstations as input devices to


accept voice commands. The voice-system input can be used to initiate
graphics operations or to enter data. These systems operate by matching an
input against a predefined dictionary of words and phrases.

You might also like