SlideShare a Scribd company logo
Computer Graphics
Introduction
Lourdes Ravi
lravi@shctpt.edu
Lecture Notes
2
 The creation and manipulation of pictures with
aid of a computer.
Passive Computer Graphics
 The observer has no control over the image.
 One way communication.
 Examples : Titles shown on T.V, Presentation
graphics.
COMPUTER GRAPHICS
3
Interactive Computer Graphics
 The observer is given some control over the
image by providing an input device, so that the
observer can signal his request to the computer.
 Two-way communication
 To the user it appears that the picture is
changing instantaneously in response to his
commands.
 Example: Flight simulator.
COMPUTER GRAPHICS
4
 The flight simulator is a mockup of aircraft flight
desk containing all the usual controls and
surrounded by screens on which are projected
computer generated views of terrain visible on
takeoff and landing.
 As the trainee pilot maneuvers his aircraft these
views change so as to maintain an accurate
impression of the plane’s motion.
 Merits: Training, Fuel savings, safety, ability to
familiarize the trainee with the world’s airports.
COMPUTER GRAPHICS
5
PIXEL
 The pixel is the smallest addressable screen element.
 It is the smallest piece of the display screen which the
user can control.
 Each pixel has a name or address. The names which
identify pixels correspond to the co-ordinates which identify
points
6
 It collects and stores pixel values as an array
in computer's memory for use by the display
device. This array which contains an internal
representation of the image, is called as the frame
buffer.
 Graphics display devices can access this
array to determine the intensity at which each pixel
should be displayed.
Frame Buffer
7
Display Controller is an interface that passes the
contents of the frame buffer to the monitor.
The display controller simply reads each
successive byte of data from the frame buffer and
convert its 0’s and 1’s into the corresponding
video signal.
This signal is then fed to the monitor producing
black and white pattern on the screen
Display Controller
8
Set Pixel
Functions
Users Program
Frame Buffer
0 0 0 0 0 0 0 0 0
0 0 0 0 1 0 0 0 0
0 0 0 1 0 1 0 0 0
0 0 1 0 0 0 1 0 0
0 0 1 1 1 1 1 0 0
0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0
Display Processor
Display
9
DISPLAY FILE INTERPRETER
Display file
 The display file will contain the information
necessary to construct the picture. The information
will be in the form of instructions such as "draw a
line" or "move the pen"
 It provides an interface between the image
specification process and the image display process.
 Such files are also called as "pseudo display files" or
"meta files".
Display File interpreter
 Display file interpreter will convert these instructions
into actual images.
10
DISPLAY FILE STRUCTURE
 Contains a sequence of display commands.
 Each display-file command contains two parts, an
operation code(op-code), and operands.
 The operation code indicates what kind of a
command it is. The operands are the co-ordinates of a
point.
Representation in memory
 Three separate arrays are used. One for the operation
code(DF-OP), one for the x coordinate(DF-X) and one
for the y coordinate(DF-Y).
11
DISPLAY FILE STRUCTURE
DF-OP DF-X DF-Y
Display file processor
Display File processor is a special purpose
processor located in a graphic terminal which
will convert the drawing instructions into actual
images.
12
Call to Line
Functions
Users Program
Display File
Display File Interpreter
Display
DF-OP DF-X DF-Y
13
An application program is input and stored in the system
memory along with the graphics package. Graphics
commands in the application program are translated by
the graphics package into a display file stored in the
system memory. This display file is then accessed by the
display processor to refresh the screen. The display
processor cycles through each command in the display
file program once during every refresh cycle.
Sometimes the display processor in the random-scan
system is referred to as a display processing unit or a
graphics controller.
DISPLAY FILE STRUCTURE
14
 Lines should appear straight.
 Lines should terminate accurately.
 Line should have constant density
 Line density should be independent of line
length and angle.
 Lines should be drawn rapidly.
Characteristics of a Good
Line Drawing algorithms
15
ANITIALIASING OF LINES
 Many displays allow only two pixel states, on
or off. For these displays, lines may have a
jagged or stair-case effect when a line step
from one row or column to the next. This is
one aspect of a phenomenon called aliasing.
 Displays which allow setting pixels to gray
levels between black and white provide a
means to reduce this effect. This technique is
called as anitialiasing .
16
CHARACTER GENERATION
There are two primary methods for character generation
1. Stroke method 2. Dot-matrix or bit-map method
Stroke method
 This method creates characters out of a series of line
segments, like strokes of a pen.
 The Character Generator can be built as series of calls to
any line drawing algorithm.
 This method lends itself to changes of scale, that is, the
characters may be made twice as large by simply
doubling the length of the line segments.
17
Dot-matrix method or Bitmap method
 In this method the characters are represented
by an array of dots.
 7 X 9 9 X 13 are the common arrays used.
 This array is like a frame buffer, just enough to
hold the character.
 Placing the character on the screen becomes a
process of copying pixel values from the small
character array into some portion of the
screen’s frame buffer.
18
Dot-matrix method or Bitmap method
 Character generator chip is the hardware
device that is the memory containing the
character dot matrix array.
 Random access memory may also be used
when many fonts are desired.
 The size of the pixel is fixed. So the dot matrix
method dose not lend itself to variable sized
characters.
19
Bitmap Method
7x9
9x13
20
PRIMITIVE OPERATIONS
Absolute line command
 Used to draw a line from the current position to the point
specified.
 LINE-ABS(X,Y)
Relative line command
 Used to draw a line from the current position to a new
position. The new position is indicated by specifying the
distances in both directions.
 LINE-REL (DX,DY)
 LINE-REL(DX,DY) is same as
LINE-ABS(X+DX,Y+DY)
21
PRIMITIVE OPERATIONS
Absolute move command
 Used to move from the current position to the point
specified.
 MOVE-ABS(X,Y)
Relative move command
 Used to move from the current position to a new
position. The new position is indicated by specifying the
distances in both directions.
 MOVE-REL(DX,DY)
22
NORMALIZED DEVICE CO-ORDINATES
 Different display devices may have different screen
sizes as measured in pixels.
 The user's program should be device independent.
 User specifies the co-ordinates in some units and
the interpreter will convert these co-ordinates to the
appropriate pixel values for a particular display device.
 Normalized device co-ordinates is the system
followed by the users in general.
 Xs = WIDTH * Xn + WIDTH-START
Ys = HEIGHT * Yn + HEIGHT-START

More Related Content

PPTX
Introduction with graphics
PPTX
A concept of graphics
PPTX
unit1_updated.pptx
PDF
Unit-1 basics of computer graphics
PPTX
computer Graphics
PPT
Introduction to computer graphics and multimedia
PDF
Computer Graphics Notes
PPTX
Unit 2 open gl .pptx
Introduction with graphics
A concept of graphics
unit1_updated.pptx
Unit-1 basics of computer graphics
computer Graphics
Introduction to computer graphics and multimedia
Computer Graphics Notes
Unit 2 open gl .pptx

Similar to introduction to computer graphics with latest trends (20)

PPTX
Overview of Computer Graphics
PPT
Graphics display-devicesmod-1
DOCX
Computer graphics
PDF
unit1 lec1.pdf
PPT
fundamentals of Computer graphics(Computer graphics tutorials)
PDF
CGR-Unit-1 Basics of Computer Graphics.pdf
PPTX
PPT
Introduction to Computer Graphics elements
PPT
Unit I-cg.ppt Introduction to Computer Graphics elements
PPT
Introduction to Computer Graphics computer
PPTX
Introduction to Computer Graphics.pptx
PPTX
Computer Graphics Introduction, Open GL, Line and Circle drawing algorithm
PDF
CG2_HWcomputergraphicshardwareeeeeee.pdf
PPTX
Chapter 1
PPTX
CSE-501-introduction.how.to calim.bio.pptx
PPT
Computer graphics - Nitish Nagar
PPTX
CG Lecture 1.pptx GRAPHIS VENNELA DONTHIREDDY
PPTX
Introduction_computer_graphics_unit-1.pptx
PPTX
Computer Graphics lecture.pptx
Overview of Computer Graphics
Graphics display-devicesmod-1
Computer graphics
unit1 lec1.pdf
fundamentals of Computer graphics(Computer graphics tutorials)
CGR-Unit-1 Basics of Computer Graphics.pdf
Introduction to Computer Graphics elements
Unit I-cg.ppt Introduction to Computer Graphics elements
Introduction to Computer Graphics computer
Introduction to Computer Graphics.pptx
Computer Graphics Introduction, Open GL, Line and Circle drawing algorithm
CG2_HWcomputergraphicshardwareeeeeee.pdf
Chapter 1
CSE-501-introduction.how.to calim.bio.pptx
Computer graphics - Nitish Nagar
CG Lecture 1.pptx GRAPHIS VENNELA DONTHIREDDY
Introduction_computer_graphics_unit-1.pptx
Computer Graphics lecture.pptx
Ad

Recently uploaded (20)

PPTX
master seminar digital applications in india
PPTX
Cell Structure & Organelles in detailed.
PDF
O5-L3 Freight Transport Ops (International) V1.pdf
PPTX
human mycosis Human fungal infections are called human mycosis..pptx
PDF
O7-L3 Supply Chain Operations - ICLT Program
PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
PDF
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
PDF
Insiders guide to clinical Medicine.pdf
PPTX
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
PPTX
PPH.pptx obstetrics and gynecology in nursing
PPTX
Microbial diseases, their pathogenesis and prophylaxis
PPTX
BOWEL ELIMINATION FACTORS AFFECTING AND TYPES
PDF
Sports Quiz easy sports quiz sports quiz
PPTX
GDM (1) (1).pptx small presentation for students
PDF
VCE English Exam - Section C Student Revision Booklet
PDF
Microbial disease of the cardiovascular and lymphatic systems
PDF
Classroom Observation Tools for Teachers
PDF
01-Introduction-to-Information-Management.pdf
PPTX
Pharma ospi slides which help in ospi learning
master seminar digital applications in india
Cell Structure & Organelles in detailed.
O5-L3 Freight Transport Ops (International) V1.pdf
human mycosis Human fungal infections are called human mycosis..pptx
O7-L3 Supply Chain Operations - ICLT Program
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
Insiders guide to clinical Medicine.pdf
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
PPH.pptx obstetrics and gynecology in nursing
Microbial diseases, their pathogenesis and prophylaxis
BOWEL ELIMINATION FACTORS AFFECTING AND TYPES
Sports Quiz easy sports quiz sports quiz
GDM (1) (1).pptx small presentation for students
VCE English Exam - Section C Student Revision Booklet
Microbial disease of the cardiovascular and lymphatic systems
Classroom Observation Tools for Teachers
01-Introduction-to-Information-Management.pdf
Pharma ospi slides which help in ospi learning
Ad

introduction to computer graphics with latest trends

  • 2. 2  The creation and manipulation of pictures with aid of a computer. Passive Computer Graphics  The observer has no control over the image.  One way communication.  Examples : Titles shown on T.V, Presentation graphics. COMPUTER GRAPHICS
  • 3. 3 Interactive Computer Graphics  The observer is given some control over the image by providing an input device, so that the observer can signal his request to the computer.  Two-way communication  To the user it appears that the picture is changing instantaneously in response to his commands.  Example: Flight simulator. COMPUTER GRAPHICS
  • 4. 4  The flight simulator is a mockup of aircraft flight desk containing all the usual controls and surrounded by screens on which are projected computer generated views of terrain visible on takeoff and landing.  As the trainee pilot maneuvers his aircraft these views change so as to maintain an accurate impression of the plane’s motion.  Merits: Training, Fuel savings, safety, ability to familiarize the trainee with the world’s airports. COMPUTER GRAPHICS
  • 5. 5 PIXEL  The pixel is the smallest addressable screen element.  It is the smallest piece of the display screen which the user can control.  Each pixel has a name or address. The names which identify pixels correspond to the co-ordinates which identify points
  • 6. 6  It collects and stores pixel values as an array in computer's memory for use by the display device. This array which contains an internal representation of the image, is called as the frame buffer.  Graphics display devices can access this array to determine the intensity at which each pixel should be displayed. Frame Buffer
  • 7. 7 Display Controller is an interface that passes the contents of the frame buffer to the monitor. The display controller simply reads each successive byte of data from the frame buffer and convert its 0’s and 1’s into the corresponding video signal. This signal is then fed to the monitor producing black and white pattern on the screen Display Controller
  • 8. 8 Set Pixel Functions Users Program Frame Buffer 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 1 0 0 0 1 0 0 0 0 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Display Processor Display
  • 9. 9 DISPLAY FILE INTERPRETER Display file  The display file will contain the information necessary to construct the picture. The information will be in the form of instructions such as "draw a line" or "move the pen"  It provides an interface between the image specification process and the image display process.  Such files are also called as "pseudo display files" or "meta files". Display File interpreter  Display file interpreter will convert these instructions into actual images.
  • 10. 10 DISPLAY FILE STRUCTURE  Contains a sequence of display commands.  Each display-file command contains two parts, an operation code(op-code), and operands.  The operation code indicates what kind of a command it is. The operands are the co-ordinates of a point. Representation in memory  Three separate arrays are used. One for the operation code(DF-OP), one for the x coordinate(DF-X) and one for the y coordinate(DF-Y).
  • 11. 11 DISPLAY FILE STRUCTURE DF-OP DF-X DF-Y Display file processor Display File processor is a special purpose processor located in a graphic terminal which will convert the drawing instructions into actual images.
  • 12. 12 Call to Line Functions Users Program Display File Display File Interpreter Display DF-OP DF-X DF-Y
  • 13. 13 An application program is input and stored in the system memory along with the graphics package. Graphics commands in the application program are translated by the graphics package into a display file stored in the system memory. This display file is then accessed by the display processor to refresh the screen. The display processor cycles through each command in the display file program once during every refresh cycle. Sometimes the display processor in the random-scan system is referred to as a display processing unit or a graphics controller. DISPLAY FILE STRUCTURE
  • 14. 14  Lines should appear straight.  Lines should terminate accurately.  Line should have constant density  Line density should be independent of line length and angle.  Lines should be drawn rapidly. Characteristics of a Good Line Drawing algorithms
  • 15. 15 ANITIALIASING OF LINES  Many displays allow only two pixel states, on or off. For these displays, lines may have a jagged or stair-case effect when a line step from one row or column to the next. This is one aspect of a phenomenon called aliasing.  Displays which allow setting pixels to gray levels between black and white provide a means to reduce this effect. This technique is called as anitialiasing .
  • 16. 16 CHARACTER GENERATION There are two primary methods for character generation 1. Stroke method 2. Dot-matrix or bit-map method Stroke method  This method creates characters out of a series of line segments, like strokes of a pen.  The Character Generator can be built as series of calls to any line drawing algorithm.  This method lends itself to changes of scale, that is, the characters may be made twice as large by simply doubling the length of the line segments.
  • 17. 17 Dot-matrix method or Bitmap method  In this method the characters are represented by an array of dots.  7 X 9 9 X 13 are the common arrays used.  This array is like a frame buffer, just enough to hold the character.  Placing the character on the screen becomes a process of copying pixel values from the small character array into some portion of the screen’s frame buffer.
  • 18. 18 Dot-matrix method or Bitmap method  Character generator chip is the hardware device that is the memory containing the character dot matrix array.  Random access memory may also be used when many fonts are desired.  The size of the pixel is fixed. So the dot matrix method dose not lend itself to variable sized characters.
  • 20. 20 PRIMITIVE OPERATIONS Absolute line command  Used to draw a line from the current position to the point specified.  LINE-ABS(X,Y) Relative line command  Used to draw a line from the current position to a new position. The new position is indicated by specifying the distances in both directions.  LINE-REL (DX,DY)  LINE-REL(DX,DY) is same as LINE-ABS(X+DX,Y+DY)
  • 21. 21 PRIMITIVE OPERATIONS Absolute move command  Used to move from the current position to the point specified.  MOVE-ABS(X,Y) Relative move command  Used to move from the current position to a new position. The new position is indicated by specifying the distances in both directions.  MOVE-REL(DX,DY)
  • 22. 22 NORMALIZED DEVICE CO-ORDINATES  Different display devices may have different screen sizes as measured in pixels.  The user's program should be device independent.  User specifies the co-ordinates in some units and the interpreter will convert these co-ordinates to the appropriate pixel values for a particular display device.  Normalized device co-ordinates is the system followed by the users in general.  Xs = WIDTH * Xn + WIDTH-START Ys = HEIGHT * Yn + HEIGHT-START