0% found this document useful (0 votes)
176 views80 pages

Computer Graphics - PPT - CH1

Uploaded by

vap3x97
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
176 views80 pages

Computer Graphics - PPT - CH1

Uploaded by

vap3x97
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 80

Computer Graphics

SECOND YEAR – COMPUTER ENGINEERING


(SEM –III)
Roles for Online class

1) Adhere to the class timings.


2) Mute yourself as soon as you get admitted to the class
3) Once teacher start presentation , kindly put your video off.
4) If any question, post in a chat box. Teacher will take those one by
one after completion of one topic.
5) Maintain decorum of the classroom. Be present in a proper dress.
6) Online attendance will be automatically recorded as well as roll
call will be taken during each class.
7) Do not present your screen while teacher is presenting.
8) If any doubt , you can unmute and ask.
Pre- requisite

 Basic
knowledge of basic
mathematics such as matrices ,
vectors
 Knowledge of C programming
Teaching Scheme
Examination Scheme
Syllabus

 CH1 - Introduction
 Definition and Representative uses of computer graphics
 Overview of coordinate system,
 Definition of scan conversion, rasterization and rendering.
 Raster scan & random scan displays
 Architecture of raster graphics system with display processor, Architecture of random
scan systems
 CH 2 - Output Primitives:
 Scan conversions of point, line, circle and ellipse
 DDA and Bresenham algorithm for line drawing
 Midpoint algorithm for circle
 Midpoint algorithm for ellipse drawing
 Aliasing, Antialiasing techniques like Pre and post filtering, super sampling,
and pixel phasing.
 Filled Area Primitive
 Scan line Polygon Fill algorithm
 Inside outside tests
 Boundary Fill and Flood fill algorithm
Syllabus

 CH -3 Two Dimensional Geometric Transformations


 Basic transformations: Translation, Scaling, Rotation
 Matrix representation and Homogeneous Coordinates
 Composite transformation
 Other transformations: Reflection and Shear
 CH -4 Two-Dimensional Viewing and Clipping
 Viewing transformation pipeline
 Window to Viewport coordinate transformation
 Clipping operations:
 Point clipping
 Line clipping algorithms: Cohen Sutherland, Liang-Barsky,
 Polygon Clipping Algorithms: Sutherland Hodgeman, Weiler-Atherton
Syllabus

 CH - 5 Three Dimensional Geometric Transformations, Curves and Fractal


Generation
 3D Transformations: Translation, Rotation, Scaling and Reflection
 Composite transformations: Rotation about an arbitrary axis
 Projections – Parallel, Perspective. (Matrix Representation)
 Bezier Curve, B-Spline Curve, Fractal-Geometry: Fractal Dimension, Koch Curve.
 CH – 6 Visible Surface Detection and Animation
 Visible Surface Detection:
 Classification of Visible Surface Detection algorithm
 Back Surface detection method
 Depth Buffer method
 Area Subdivision method
 Animation: Introduction to Animation, Traditional Animation Techniques, Principles of
Animation, Key framing: Character and Facial Animation, Deformation, Motion capture
Text Books
CHAPTER 1 - INTRODUCTION

What is Computer Graphics?


 Computer Graphics is the use of computers to create and
manipulate pictures on a display device. It comprises of software
techniques to create, store, modify, represents pictures.
 In graphics objects are presented as a collection of discrete pixels.
Applications of Computer Graphics

 Education and Training:


 Computer-generated model of the physical, financial and
economic system is often used as educational aids.
 We can also use simulators for training students.
 For some training applications, particular systems are World Population
designed. For example Flight Simulator. Trends
 Flight Simulator: It helps in giving training to the pilots
of airplanes. These pilots spend much of their training not
in a real aircraft but on the ground at the controls of a
Flight Simulator.

Flight Simulator
Applications of Computer Graphics

 Use in Biology: Molecular biologist can display a


picture of molecules and gain insight into their
structure with the help of computer graphics.
 Computer-Generated Maps: Town planners and
transportation engineers can use computer-
generated maps which display data useful to them in Model of DNA
their planning work.
 Architect: Architect can explore an alternative
solution to design problems at an interactive graphics
terminal. In this way, they can test many more
solutions that would not be possible without the
computer.

Computer generated maps


Applications of Computer Graphics

 Presentation Graphics: Example of presentation Graphics are bar charts, line


graphs, pie charts and other displays showing relationships between multiple
parameters. Presentation Graphics is commonly used to summarize
 Financial Reports
 Statistical Reports
 Mathematical Reports
 Scientific Reports
 Economic Data for research reports
 Managerial Reports
 Consumer Information Bulletins
 And other types of reports
Applications of Computer Graphics

 Computer Art: Computer Graphics are also used in the field of commercial arts.
It is used to generate television and advertising commercial.
 Entertainment: Computer Graphics are now commonly used in making motion
pictures, music videos and television shows.
 Visualization: It is used for visualization of scientists, engineers, medical
personnel, business analysts for the study of a large amount of information.
 Educational Software: Computer Graphics is used in the development of
educational software for making computer-aided instruction.
 Printing Technology: Computer Graphics is used for printing technology and
textile design.
Data visualization
Overview of coordinate System

 What is coordinate system??


A coordinate system is a system that uses one or more numbers,
or coordinates, to uniquely determine the position of the points or other
geometric elements.
 There are two types of coordinate systems
1) Cartesian coordinate system
2) Polar coordinate system
Cartesian coordinate system

 In the plane two perpendicular lines are


chosen and the coordinates of a point are
taken to be the signed distances to the lines.
Cartesian coordinate system in 3D
space
Polar coordinate system

 A polar coordinate system is a two-dimensional


coordinate system in which each point on a plane
is determined by a distance from a reference
point and an angle from a reference
direction.
Key Terms:
 radius: A distance measured from the pole.
 angular coordinate: An angle measured from
the polar axis, usually counter-clockwise.
 pole: The reference point of the polar graph.
 polar axis: A ray from the pole in the reference
direction.
Conversion

 To convert from polar to rectangular


(Cartesian) coordinates use the following
formulas:

cos θ = x / r
sin θ = y / r

x = r cosθ
y = r sin θ
Scan Conversion

 Definition of scan conversion


 The process of representing continuous graphics objects as
a collection of discrete pixels is called scan conversion.
 Every graphics system must transform the primitives into a
collection of pixels.
 The scan conversion is also called “Rasterization.” Each
pixel in the graphical system has two states
either on or off.
 Converting its geometric definition to set of pixels.
Example

 In geometric form , a line can be represented as


x – x1 = m (y – y1)
OR
y = mx + c
 A circle in its geometric form can be written as
x2 + y 2 = r 2
Rasterization and Rendering

 Rendering: Rendering is the process of generating an image from a model,


by means of a software program.

 The Model : The model is a description of three dimensional objects in a strictly


defined language or data structure. It would contain geometry, viewpoint,
texture, lighting information.

 The Image: The image is a digital image or raster graphics image.

 In the 'graphics pipeline' it's the last major step, giving the final appearance to
the models and animation.
 It has uses in computer and video games, simulators, movies or TV special
effects, and design visualization, each employing a different balance of features
and techniques
Rendering

 https://www.youtube.com/watch?v=0Ysc9PViwgM
CRT – Cathode Ray Tube

 The primary output device in a graphical system is the video monitor.


 The main element of a video monitor is the CRT - Cathode Ray Tube.
 CRT is a technology used in traditional computer monitors and televisions.
 CRT is a vacuum tube.
CRT – Cathode Ray Tube
Components of CRT

 Electron Gun: Electron gun consists of a heating filament (a heater) and a


cathode. When cathode is heated with heating filament, cathode generates
electrons.
 Control Grid: It is used to turn the electron beam on and off. Intensity of electron
beam is controlled by setting voltage levels on control grid. A high negative voltage
applied to control grid will shut the beam off.
 Focusing system: It is used to create a clear picture by focusing the electrons into
a narrow beam.
 Deflection Plates: It is used to control the direction of the electron beam. There are
two pair of deflection plates. Horizontal and Vertical. Horizontal deflection plates
controls horizontal movement and vertical deflection plates controls vertical
movement of the electron beam. It creates an electric or magnetic field which will
bend the electron beam as it passes through the area.
 Phosphorus-coated screen: The inside front surface of every CRT is coated with
phosphors. Phosphors glow when a high-energy electron beam hits them.
Operation of CRT

 The electron gun emits a beam of electrons - cathode rays.


 The electron beam passes through focusing and deflection systems that direct it towards
specified positions on the phosphor-coated screen.
 When the beam hits the screen, the phosphor emits a small spot of light at each position
contacted by the electron beam.
 Because the light emitted by the phosphor fades very rapidly, some method is needed for
maintaining the screen picture.
 One way to keep the phosphor glowing is to redraw the picture repeatedly by quickly directing
the electron beam back over the same points. This type of display is called a refresh CRT.
Properties of Phosphor

 It is a substance that exhibits the phenomenon of luminescence (Luminance is a


spontaneous emission of light by a substance)
 Phosphors are available in various colors starting with basic Red, Green and Blue.
 Persistence: For the phosphors coated on the screen, persistence represents the
duration they continue to emit light after the CRT beam is removed.
 Persistence is defined as the time it takes the emitted light from the screen to decay to
one tenth of its original intensity.
 Lower-persistence phosphors require higher refresh rates to maintain a picture on the
screen without flicker.
 A phosphor with low persistence is useful for animation; a high-persistence phosphor is
useful for displaying highly complex, static pictures.
 Although some phosphors have a persistence greater than 1 second, graphics monitors
are usually constructed with a persistence in the range from 10 to 60 microseconds.
Resolution

 The maximum number of points that can be displayed without overlap on a CRT is
referred to as the resolution.
 A more precise definition of resolution is the number of points per centimeter that can be
plotted horizontally and vertically, although it is often simply stated as the total number
of points in each direction.
 For example : Resolution is 1024 x 850
 Resolution of a CRT is dependent on the type of phosphor, the intensity to be displayed,
and the focusing and deflection systems.
 Typical resolution on high-quality systems is 1280 by 1024.
 High- resolution systems are often referred to as high-definition systems.
 The physical size of a graphics monitor is given as the length of the screen diagonal, with
sizes varying from about 12 inches to 27 inches or more.
Aspect ratio

 The aspect ratio of a display device is the proportional relationship between the
width and the height of the display.
 Common aspect ratios for displays include 5:4, 4:3, 16:10 and 16:9.
 The aspect ratio 4:3 means that the ratio of the width of the display screen to
the height is 4 to 3.
 An aspect ratio of 4 / 3 means that a horizontal line plotted with four points has
the same length as a vertical line plotted with three points.
Color Depth

 Color depth of a display is number of bits used to hold the color value
of each pixel.
 1 – bit = 2 colors
 2 – bit = 4 colors
 3 – bit = 8 colors
 8-bits = 256 colors
Color CRT Monitors

 The CRT Monitor display by using a combination of phosphors.


 The phosphors comes in different colors.
 There are two popular approaches for producing color displays with a
CRT are:
1) Beam Penetration Method
2) Shadow-Mask Method
Beam penetration method

 The Beam-Penetration method has been used with random-scan monitors.


 In this method, the CRT screen is coated with two layers of phosphor : red and green.
 The displayed color depends on how far the electron beam penetrates the phosphor
layers.
 This method produces four colors only, red, green, orange and yellow.
 A beam of slow electrons excites the outer red layer only; hence screen shows red color
only.
 A beam of high-speed electrons excites the inner green layer. Thus screen shows a
green color.
 At intermediate beam speeds, combinations of red and green light are emitted to show
two additional colors, orange and yellow.
 The speed of the electrons, and hence the screen color at any point, is controlled by the
beam-acceleration voltage.
Beam penetration method

Advantages:
1.Inexpensive

Disadvantages:
2.Only four colors are possible
3.Quality of pictures is not as good as with another method.
Shadow Mask method

 Shadow Mask Method is commonly used in Raster-Scan System because they produce a much
wider range of colors than the beam-penetration method.
 It is used in the majority of color TV sets and monitors.
 This type of CRT has 3 electron guns, one for each color dot and a shadow mask grid just behind
the phosphor coated screen.
 The three electron beams are deflected and focused as a group onto the shadow mask, which
contains a series of holes aligned with the phosphor-dot patterns.
 When the three beams pass through a hole in the shadow mask, they activate a dot triangle, which
appears as a small color spot on the screen.
 The phosphor dots in the triangles are arranged so that each electron beam can activate only its
corresponding color dot when it passes through the shadow mask.
 We obtain color variations in a shadow-mask CRT by varying the intensity levels of the three electron
beams.
Shadow Mask Method
Shadow mask Method

Advantage:
 Realistic image
 Million different colors to be generated
 Shadow scenes are possible
Disadvantage:
 Relatively expensive compared with the monochrome CRT.
 Relatively poor resolution
There are two ways by which we can display an object on the screen

1) Raster scan and

2) Random scan
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.
 When each scan of the line is refreshed it returns
to the left side of the screen. This motion is
known as Horizontal retrace.
 As a particular frame ends, the beam of electron
moves to the left top corner of the screen to
move to another frame. This motion is referred to
as Vertical retrace.
Raster Scan display – refresh buffer

 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 at a time.
 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.
 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
Raster Scan Display

 The image formed through this raster scan is


known as a raster image. The quality of
this image is determined by the number of
pixels which is termed as the resolution of
the image.
 The amount of information each pixel
represents is known as the color depth of
the image.
Raster Scan display - Interlacing

Types of Scanning or travelling of beam in Raster Scan


 Interlaced Scanning
 Non-Interlaced Scanning
Interlaced scanning

Interlaced scanning
 First , all odd numbered lines are traced or visited
by an electron beam, then in the next cycle, even
number of lines are traced.
 Here , screen is scanned twice.

Advantage:
1) Avoid Flicker
2) Most commonly used for slower refresh rate.
Raster scan display

Advantages:
 Generates realistic image Jagged lines
 Million Different colors to be generated
 Shadow Scenes are possible.

Disadvantages:
 Low Resolution
 Expensive since it requires special display processor.
 Produces jagged lines that are plotted as discrete point
sets.

Example of Raster can device: TV monitor


 Quality of a raster scan display depends on the total no. of pixels on the
display device (resolution) and the amount of information present in
each pixel (Color depth).
 In black-and-white system each point on the screen is either on or off
so only 1 – bit is needed to store intensity of a pixel. Such frame buffers
are called bitmap.
 High quality raster graphics system have 24-bits per pixel in the
frame buffer (This is called true color system)
Random Scan Display/ Vector Scan
display / Stroke Display
 The electron beam is directed only to the part of
the screen where the picture is to be drawn.
 Random scan monitors draw a picture one line at
a time and for this reason are also referred to as
vector display, stroke-writing
display, or calligraphic display.
 Picture definition is stored as a set of line-drawing
commands in an area of memory referred to as
the refresh display file.
 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 the line-drawing commands are
processed, the system cycles back to the first line
command in the list.
Random Scan Display

 Refresh rate on a random-scan system depends on the number of lines to


be displayed.
 Random-scan displays are designed to draw all the component lines of a
picture 30 to 60 times each second.
Random Scan Display

Advantages of Random Scan display:


 High resolution as compared to raster scan.
 Produces smooth lines because the CRT beam directly follows the line path.
 Requires less memory since picture definition is stored in terms of commands in display file

Disadvantages of random scan display:


 Requires intelligent electron beam i.e. processor controlled
 Limited color capacity
 Designed for simple line drawing applications and can’t draw complex images

Application: Used in Engineering and Architectural Design

EXAMPLE of random scan device : Pen plotter


Example of vector scan device
Pen Plotter – Video Link

 https://www.globalspec.com/learnmore/industrial_computers_boards/co
mputer_peripherals/computer_printers_plotters
Architecture of raster graphics system with display
processor
Main component of Raster scan
system Architecture

 Display Processor
 Video Controller
 Frame buffer
Raster scan system - Display
Processor

 Display processor is also called the graphics controller.


 It is used is to free the CPU form the graphic chores.
 The main task of the display processor is scan conversion.
 It receives a graphics command form an application program and
converts this command into a set of pixel intensity values which are
then stored in a frame buffer. This process is called scan conversion.
 In addition to the system memory, separate display processor memory
can also be provided.
Raster scan system – Video
Controller

 Once the picture definition is stored in frame buffer, a special processor called
video controller (or display controller), is used to control the operation of the
display device.
 A fixed area of the system memory is reserved for the frame buffer and the
video controller is given direct access to the frame buffer memory.
 The frame buffer holds the intensity values for all the screen points.
 The video controller retrieves the stored intensity values from frame buffer and
display them onto the screen one row at a time.
Raster scan system - Video
Controller
Architecture of Random scan Display
system
Architecture of Random scan display
system
Architecture of Random Scan display
System
 In this system the picture definition is stored in buffer called refresh display file
in terms of a set of commands.
 This display file is then accessed by the display processor to refresh the screen.
 The display processor (also called Display controller) cycles through each command
in the display file program.
 The display processor interprets these commands and convert them in to digital
values. This digital values are fed to the vector generator.
 The vector generator is a device, which converts digital values into analog voltages
and feed them to display device.
 Sometimes the display processor in a random-scan is referred as Display Processing
Unit / Graphics Controller.
Random scan system

ADVANTAGES:
 Higher resolution as compared to raster scan display.
 Produces smooth line drawing.
 Less Memory required.
DISADVANTAGES:
 Realistic images with different shades cannot be drawn.
 Colour limitations.
No. Raster Scan System Random Scan System
1 In Raster scan system the electron beam swapped across a In Random scan system draw a picture one line at
screen one row at a time from Top to Bottom .As the electron a time for this reason called as Vector display.
beam moves across each row .The beam intensity is turned ON or Stroke writing or calligraphics displays.
OFF to create a pattern of illuminated spot.

2. Picture definition is stored in a memory area called Frame buffer Picture definition is now stored is a set of line
or Refresh buffer. This memory area holds the set of intensity drawing command in an area of memory which is
value for all the screen points. called refresh displayed file.
3. Home television sets & Dot matrix printers e.g. of such system A Pen plotter operate in similar way & an e.g. of
using of Raster scan system. Random scan system.
4. Refreshing on Raster scan display is carryout at the Rate of 60 to Refreshing in Random scan display to draw all the
80 frames per seconds. components of lines of pictures 30 to 60 frames
per second.
5. Picture with better contrast. Cannot produce contrast ,memory doesn’t store
intensity values of pixels.
6. Raster scan system have lower Resolution than Random scan Random scan system have higher Resolution than
resolution system. Raster scan system.
7. In Raster scan system produced Zacked lines that are plot. Random scan produce smooth line drawing
because the CRT directly follows line path.
8. Raster scan system designed for to display Realistic shaded Random scan system are designed for line drawing
screen. application & can’t display Realistic shaded screen.
9. It is less expensive than Raster Scan system. It is costlier than Random Scan system.
10. Shadow mark technology came under this Beam Penetration technology come under it.
QUIZ

In raster scan display the frame buffer holds ________________


A) Line drawing commands
B) scanning instructions
C) Image resolution
D) Intensity Information
Vector Display is well suited for _____________
A. Line drawing applications
B. Animation
C. Realistic Image
D. All of these
Beam penetration method is usually used in ...........
A. LCD
B. Raster Scan Display
C. Random Scan Display
D. DVST
Identify the colors produced in beam penetration method
A. Red , Green, Blue , Orange
B. Red , Green , blue , White
C. Red , Green , Yellow, Orange
D. Red , Green , Yellow, blue
 For computer display following color Model is used
A. RBG and CMKY
B. RGB and CMYK
C. RGB and CYMK
The basic geometric structures that describes a scene on display is
called .................
A. Attribute
B. Output Primitive
C. Lines
D. Curves
The maximum number of points that can be displayed without overlap on
a CRT is referred as
A. Resolution
B. Depth
C. Aspect ratio
D. Picture
 The process of digitizing a given picture definition into a set of pixel-
intensity for storage in the frame buffer is called
A. Scanning
B. Encoding
C. Scan conversion
D. Rendering
 The ___ simply reads each successive byte of data from the
frame buffer?
(A) Digital Controller
(B) Data Controller
(C) Display Controller
(D) All of above
 On a monochromatic monitor, the frame buffer is known
as ......................
A) Display File
B) Pixmap
C) Bitmap
D) Color map
 ..................... is the number of points per centimeter that can be
plotted horizontally and vertically.
A) Aspect Ration
B) Resolution
C) Color depth
D) Pixel depth
 ...................... is the ratio of horizontal points to vertical points
necessary to produce equal length lines in both direction.
A) Resolution
B) Aspect ration
C) Dot pitch
D) Depth
 In CRT, the electron intensity is adjusted using .................
(A) Accelerating anode
(B) Control grid
(C) Electron gun
(D) Focusing anode
 Lower persistence phosphorus is used in
(A) Animation
(B) Simple object
(C) Complex object
(D) All of these
 Higher persistence phosphorus needs _________ refresh rate
a) Lower
b) Higher
c) Medium
d) None of these
 The fly-back of electron beams from one scanline to next is known
as ....................
a) Vertical Retrace
b) Horizontal Retrace
c) Raster scanning
d) Refreshing
Thank You

You might also like