You are on page 1of 18

Computer Science III B.

Sc CS Sem : VI Year 2019 - 2020

Subject: Graphics and Multimedia

Google Classroom : oefqdki Subject code: 63A

Output Primitives
Unit 1 : Loading frame Buffer

Dr.M.Manimaran,
Associate Professor,
Department Computer Science, SKACAS
oefqdki - Graphics & Multimedia Unit I Output Primitives 1
Computer Science III B.Sc CS Sem : VI Year 2019 - 2020

SNAP TALK / ATTENDANCE

oefqdki - Graphics & Multimedia Unit I Output Primitives 2


Computer Science III B.Sc CS Sem : VI Year 2019 - 2020

Lecture Agenda
• Introduction to loading frame buffer
• relative or absolute coordinates
• frame buffer array

oefqdki - Graphics & Multimedia Unit I Output Primitives 3


Computer Science III B.Sc CS Sem : VI Year 2019 - 2020

Expected otcome
After studying this class, you should be able to:

• To understand the concepts of loading frame buffer


• To understand the concepts of Relative or absolute
coordinates
• To understand the concepts of frame buffer array

oefqdki - Graphics & Multimedia Unit I Output Primitives 4


Computer Science III B.Sc CS Sem : VI Year 2019 - 2020

Lecture Agenda
What is Frame Buffer
• A frame buffer is a large, contiguous piece
of computer memory.
• At a minimum there is one memory bit for each
pixel in the raster; this amount of memory is
called a bit plane.
• The picture is built up in the frame buffer one bit
at a time

oefqdki - Graphics & Multimedia Unit I Output Primitives 5


Computer Science III B.Sc CS Sem : VI Year 2019 - 2020

Loading the Frame Buffer


• When straight line segments and other objects are
scan converted for display with a raster system,
frame-buffer positions must be calculated.
• Scan conversion algorithms generate pixel positions
at successive unit intervals.
• This allows using incremental methods to calculate
frame buffer addresses

oefqdki - Graphics & Multimedia Unit I Output Primitives 6


Computer Science III B.Sc CS Sem : VI Year 2019 - 2020

Loading the Frame Buffer


– Suppose the frame buffer array is addressed in
row major order and that pixel positions vary from
(0,0) at the lower left screen corner to (xmax,ymax) at
the top right corner.
– For a bi-level system (1 bit per pixel) the frame
buffer bit address for pixel position (x,y) is
calculated as
• addr(x,y) = addr(0,0) + y(xmax +1) + x

oefqdki - Graphics & Multimedia Unit I Output Primitives 7


Computer Science III B.Sc CS Sem : VI Year 2019 - 2020

Loading the Frame Buffer


 Moving across the scan line calculate the frame
buffer address for the pixel at(x+1,y) as the following
offset from the address for position (x,y)
 addr(x +1,y) = addr(x,y) + 1

oefqdki - Graphics & Multimedia Unit I Output Primitives 8


Computer Science III B.Sc CS Sem : VI Year 2019 - 2020

Loading the Frame Buffer


 Stepping diagonally up to the next scanline from (x,y)
we get the frame buffer address of (x+1,y+1) with
the calculation
 addr(x +1,y+1) = addr(x,y) + xmax + 2
 where the constant xmax + 2 is pre computed once for
all line segments

oefqdki - Graphics & Multimedia Unit I Output Primitives 9


Computer Science III B.Sc CS Sem : VI Year 2019 - 2020

Loading the Frame Buffer

oefqdki - Graphics & Multimedia Unit I Output Primitives 10


Computer Science III B.Sc CS Sem : VI Year 2019 - 2020

Key Points
• Frame buffer addresses
• Relative or absolute coordinates
• Frame buffer array

oefqdki - Graphics & Multimedia Unit I Output Primitives 11


Computer Science III B.Sc CS Sem : VI Year 2019 - 2020

MCQ
1)A _______is a large, contiguous piece
of computer memory.
a) Frame buffer
b) Pixel
c) Memory
d) Points

oefqdki - Graphics & Multimedia Unit I Output Primitives 12


Computer Science III B.Sc CS Sem : VI Year 2019 - 2020

MCQ
2) The __________is built up in the frame buffer
one bit at a time
a) Pixel
b) Picture
c) Points
d) All the above

oefqdki - Graphics & Multimedia Unit I Output Primitives 13


Computer Science III B.Sc CS Sem : VI Year 2019 - 2020

MCQ ANSWERS
1) Frame buffer
2) Picture

oefqdki - Graphics & Multimedia Unit I Output Primitives 14


Computer Science III B.Sc CS Sem : VI Year 2019 - 2020

VIDEO URL

https://www.youtube.com/watch?v=bwVNx98Fh
OQ

oefqdki - Graphics & Multimedia Unit I Output Primitives 15


Computer Science III B.Sc CS Sem : VI Year 2019 - 2020

Next Lecture
Circle Generating Algorithms

oefqdki - Graphics & Multimedia Unit I Output Primitives 16


Computer Science III B.Sc CS Sem : VI Year 2019 - 2020

DISCUSSIONS

17
oefqdki - Graphics & Multimedia Unit I Output Primitives 17
Computer Science III B.Sc CS Sem : VI Year 2019 - 2020

18
oefqdki - Graphics & Multimedia Unit I Output Primitives 18

You might also like