SlideShare a Scribd company logo
1 of 44
Computer Graphics
Software/hardware
Visualisation
Windowing and clipping
Lighting and shading
Hidden surface and solid removal
Color models
CAPABILITIES FOR MODELING IN A TYPICAL GRAPHICS
WORKSTATION ENVIRONMENT
a. 2D and 3D modeling and drafting facilities
b. Display of text
c. Animation
d. Color selection (usually a palette of 256 colors)
e. 3D viewing
f. Z-buffering
g. Gouraud shading
h. Depth cueing
i. Lighting models
j. Anti-aliasing
k. Texture mapping
ARCHITECTURE OF A TYPICAL GRAPHICS WORKSTATION
A color (RGB) monitors with
19" screen size and resolution
of 1280 x1024 pixels is the
standard. Some workstations
will have monitors with
resolution of 1920 x 1200
pixels
CPU board with a RISC (Reduced
Instruction Set Computing)
Microprocessor with Cache Memory
and 4/8 GB RAM.
HDD 1 TB
communication facilities
display generation and
manipulation.
Workstations consist of three basic
components
A primary processor
Associated memory
Graphics display system and software
Leading workstations like SUN, IBM, Silicon
Graphics, Hewlett-Packard etc., use special
architecture based on RISC (Reduced
Instruction Set Computing) chips and
specialized graphic boards.
The graphic features like display manipulation are realized in
hardware for fast response. Workstations typically place emphasis
on graphics display and manipulation.
The features of a display system are directly related to Functions such
as color fill; entity generation and transformation of displays are
controlled by the display processor and associated hardware.
CAD systems are no more than computer programs. The software comprises a
number of different elements or functions that process the data stored in the
database in different ways.
Main Functions of CAD Systems
1. Model definition: for example to add geometric elements to a model
2. Model manipulation: to move, copy, delete, edit or otherwise modify elements in
the design model.
3. Picture generation: to generate images of the design model on a computer screen
or on some hard-copy device.
4. User interaction: to handle commands input by the user and to present output to
the user about the operation of the system.
5. Database management: for the management of the files that make up the DB.
6. Applications: these elements of the software do not modify the design model, but
use it to generate information for evaluation, analysis or manufacture.
7. Utilities: a “catch-all” term for parts of the software that do not directly affect the
design model, but modify the operation of the system in some way (for example, to
select the color to be used for display, or the units to be used for construction of a
drawing).
These features may be provided by multiple programs operating on a common
database, or by a single program encompassing all of the elements.
What is GPU Computing?
GPU computing is the use of a GPU (graphics processing unit) as a co-processor to
accelerate CPUs for general-purpose scientific and engineering computing.
The GPU accelerates applications running on the CPU by offloading some of the
compute-intensive and time consuming portions of the code.
The rest of the application still runs on the CPU.
From a user’s perspective, the application runs faster because it’s using the massively
parallel processing power of the GPU to boost performance. This is known as
“heterogeneous” or “hybrid” computing.
A CPU consists of four to eight CPU cores, while the GPU consists of hundreds of smaller
cores. Together, they operate to crunch through the data in the application. This
massively parallel architecture is what gives the GPU its high compute performance.
There are a number of GPU-accelerated applications that provide an easy way to access
high-performance computing (HPC).
Application developers harness the performance of the parallel GPU architecture
using a parallel programming model invented by NVIDIA called “CUDA.” All NVIDIA
GPUs—GeForce®, Quadro®, and Tesla®--support the NVIDIA® CUDA® parallel-
programming model.
WHAT IS CUDA?
CUDA™ is a parallel computing platform and programming model invented by NVIDIA.
It enables dramatic increases in computing performance by harnessing the power of
the graphics processing unit (GPU).
Identify hidden plaque in arteries: Heart attacks are the leading cause of death worldwide.
Harvard Engineering, Harvard Medical School and Brigham & Women's Hospital have teamed up
to use GPUs to simulate blood flow and identify hidden arterial plaque without invasive imaging
techniques or exploratory surgery.
The latest Tesla 20-series GPUs are based on the latest implementation of the CUDA platform
called the “Fermi architecture ”. Fermi has key computing features such as 500+ gigaflops of IEEE
standard double-precision floating-point hardware support, L1 and L2 caches, ECC memory error
protection, local user-managed data caches in the form of shared memory dispersed throughout
the GPU, coalesced memory accesses, and more.
What are the difference between Cloud, Cluster and Grid Computing?
All three systems are distributed and share similar characteristics.
The similarities relate to resource pooling and broad network access – two criteria that are
fulfilled by all systems.
Network access to cluster and grid computing systems usually takes place within a corporate
network, while the services of a cloud computing system can also be accessed through public
network, i.e. the Internet.
Resources in grid and cluster environments are generally pre-reserved, while cloud computing
systems are demand driven, i.e. operation of these systems is geared to consumers’ actual needs.
Another difference concerns the “rapid elasticity” criterion, which forms an integral part of cloud
computing systems but is not normally supported by cluster or grid systems.
Compared to other distributed systems such as grids or clusters, cloud computing solutions give
enterprises significantly more flexibility. They can dispense with IT infrastructures of their own
and only have to pay for the resources and services they actually use (“pay-per-use”/ “pay as you
go)
Two interactive operations that carried out in CAD:
* Redrawing of the display to “clean-up” unwanted clutter on the screen
or to restore parts of the image that have been corrupted.
*Selection of entities from the screen.
In each of these cases, work is not just done with the base entity data, but with a
display file that stores the displayable vectors for an entity.
For example, in the selection of a surface without use of a display file it would be
necessary to recompute the surface display in order to identify which path is nearest
to the cursor. With a display file it is only necessary to find the nearest displayed
vector and to cross-reference back to the entity.
Display files also lend themselves to fast image manipulation or zoom facilities.
Instead of recomputing the entire image for a zoom within existing window boundary,
the display file vectors are used- leading to some loss in display resolution for curves,
but generally faster display control.
The display file is related to the rest of the data by cross-referencing between the
display file and the entity table.
Display Algorithms
11
RASTER SCAN TECHNIQUE
• The screen of a monitor can be considered to consist of a large
number of minute subdivisions called picture elements (pixels, in
short).
• For example, in a typical SVGA monitor, the screen is divided
horizontally into 1024 units and vertically into 768 units.
• The resolution of this monitor is then 1024 x 768.
• A raster CRT graphics device can be considered a matrix of discrete
cells each of which can be made bright.
• Thus it is basically a point plotting device. If a line is to be drawn, it
can be approximated by a series of dots close to the path of the
line.
• A frame buffer is a common method of implementing a raster CRT graphics
device.
• It can be considered to be a large contiguous piece of computer memory. In the
simplest can, there can be one memory bit for each pixel in the raster. This
amount of memory is called a bit plane.
• A 320 X 200 raster requires 64 K memory bits in a single plane. The picture is
built in the frame buffer one bit at a time. The memory bits can be either in 0
or 1 state.
• If a particular pixel is to be addressed, the corresponding bit in the frame buffer
is changed from 0 to 1.
• Since the raster CRT is an analog device, it requires an electrical voltage and
the digital data of the frame buffer has to be converted to an analog voltage
through a digital to analog converter (DAC).
• Additional bit planes can be used for each of the three
color guns. In a 24 bit plane buffer 8 bit planes are used
for each color.
• Each group drives a 8 bit Digital to Analog
Converter (DAC) and can generate 28 = 256 intensities of
red, green and blue.
This when combined together can result in (28)3 = 16,
777, 216 or 16.7 million possible colors.
A drawing is created by an assembly of basic entities
Points
Lines
Arcs
Circles
The fundamental principles of generation of some of these entities are discussed in
this lecture
-Point plotting
-Line/Circle plotting
POINT PLOTTING
-The frame buffer display is an example of a point plotting device.
- The smallest unit accepted by such displays is a single pixel.
- To construct a useful picture on a point plotting device, a picture must
be built out of several hundreds of pixels.
A Framebuffer is a video output device that drives a video display from
a memory buffer containing a complete frame of data.
The information in the memory buffer typically consists of color values
for every pixel (point that can be displayed) on the screen.
Electron beam (if the display technology uses one) is commanded to
trace a left-to-right, top-to-bottom path across the entire screen, the
way a television renders a broadcast signal.
At the same time, the color information for each point on the screen is
pulled from the framebuffer, creating a set of discrete picture elements
DRAWING OF LINES
Straight line segments are used a great deal in computer generated
pictures. The following criteria have been stipulated for line drawing
displays :
• i. Lines should appear straight
• ii. Lines should terminate accurately
• iii. Lines should have constant density
• iv. Line density should be independent of length and angle
• v. Line should be drawn rapidly
There are several schemes for selecting the pixels between the end
pixels.
One method of generating a line segment is a
Symmetrical Digital differential analyzer (DDA) and other is
Breshanhams algorithm
Line Drawing Algorithms
• Line drawn as pixels
• Graphics system
– Projects the endpoints to their pixel locations in the
frame buffer (screen coordinates as integers)
– Finds a path of pixels between the two
– Loads the color
– Plots the line on the monitor from frame buffer (video
controller)
– Rounding causes all lines except horizontal or vertical
to be displayed as jigsaw appearance (low resolution)
– Improvement: high resolution, or adjust pixel
intensities on the line path.
10/10/2006 TCSS458A Isabelle Bichindaritz 18
Line Drawing Algorithms
• Line equation
– Slope-intercept form
y = m . X + c
slope m and Y-intercept c
– Slope
– Y-intercept
19
0
0 mx
-
y
=
c
x
y
0
end
0
end
=
x
-
x
y
-
y
=
m


Line Drawing Algorithms
• DDA (Digital Differential Analyzer)
– Scan conversion line algorithm
– Line sampled at regular intervals of x, then
corresponding y is calculated
– From left to right
– The calculation has to be simplified as below
20
)
1
=
(
m
1
+
x
=
x
1.0,
m
if
)
1
=
(
m
+
y
=
y
1,
>
m
if
y
k
1
+
k
x
k
1
+
k



10/10/2006 TCSS458A Isabelle Bichindaritz 21
Line Drawing Algorithms
• Advantage
– Does not calculate coordinates based on the
complete equation (uses offset method)
• Disadvantage
– Round-off errors are accumulated, thus line
diverges more and more from straight line
– Round-off operations take time
• Perform integer arithmetic by storing float as
integers in numerator and denominator and
performing integer artithmetic.
22
DDA ALGORITHM
The digital differential analyzer generates lines from their differential
equations.
The DDA works on the principle that X and Y are simultaneously
incremented by small steps proportional to the first derivatives of X and
Y.
begin
length : = abs (X2– X1) ;
if abs (Y2–Y1) < length then length: = abs (Y2–Y1);
X - incr : = (X2 – X1) /length ;
Y - incr : = (Y2 – Y1) /length ;
X : = X1 + 0.5 ; Y = Y1 + 0.5 ;
for i : = 1 to length do
begin
plot (trunc (X) ; trunc(Y) ;
X : = X + X - incr ;
Y : = Y + Y - incr ;
end;
end.
Merits + Demerits
• Faster than the direct use of line Eqn.
• It eliminates the multiplication in line Eqn.
• For long line segments, the true line Path may
be mislead due to round off.
• Rounding operations and floating-point
arithmetic are still time consuming.
• The algorithm can still be improved.
• Other algorithms, with better performance also
exist.
Line Drawing Algorithms
• Bresenham’s line drawing
– Efficient line drawing algorithm using only incremental
integer calculations
– Can be adapted to draw circles and other curves
• Principle
– Vertical axes show scan line positions
– Horizontal axes show pixel columns
– At each step, determine the best next pixel based on
the sign of an integer parameter whose value is
proportional to the difference between the vertical
separations of the two pixel positions from the actual
line.
25
The Bresenham Line Algorithm
• The Bresenham algorithm is
another incremental scan
conversion algorithm
• The big advantage of this
algorithm is that it uses only
integer calculations
Jack Bresenham worked
for 27 years at IBM
b e f o r e e n t e r i n g
academia. Bresenham
developed his famous
algorithms at IBM in the
e a r l y 1 9 6 0 s
The Big Idea
• Move across the x axis in unit intervals and at
each step choose between two different y
coordinates
2 3 4 5
2
4
3
5
For example, from
position (2, 3) we have
to choose between (3,
3) and (3, 4)
We would like the
point that is closer to
the original line
(xk, yk)
(xk+1, yk)
(xk+1, yk+1)
The y coordinate on the mathematical line at xk+1
is:
Deriving The Bresenham Line Algorithm
• At sample position xk+1 the
vertical separations from the
mathematical line are labelled
dupper and dlower
b
x
m
y k 

 )
1
(
y
yk
yk+1
xk+1
dlower
dupper
• So, dupper and dlower are given as follows:
• and:
• We can use these to make a simple decision
about which pixel is closer to the mathematical
line
Deriving The Bresenham Line Algorithm (cont…)
k
lower y
y
d 

k
k y
b
x
m 


 )
1
(
y
y
d k
upper 

 )
1
(
b
x
m
y k
k 



 )
1
(
1
BRESENHAM’S LINE DRAWING ALGORITHM
(for |m| < 1.0)
1. Input the two line end-points, storing the left end-point in
(x0, y0)
2. Plot the point (x0, y0)
3. Calculate the constants Δx, Δy, 2Δy, and (2Δy - 2Δx) and
get the first value for the decision parameter as:
4. At each xk along the line, starting at k = 0, perform the
following test. If pk < 0, the next point to plot is
(xk+1, yk) and:
x
y
p 


 2
0
y
p
p k
k 


 2
1
The Bresenham Line Algorithm (cont…)
The algorithm and derivation above assumes
slopes are less than 1. for other slopes we
need to adjust the algorithm slightly
Otherwise, the next point to plot is (xk+1, yk+1) and:
5. Repeat step 4 (Δx – 1) times
x
y
p
p k
k 




 2
2
1
Bresenham Example
• Let’s have a go at this
• Let’s plot the line from (20, 10) to (30, 18)
• First off calculate all of the constants:
– Δx: 10
– Δy: 8
– 2Δy: 16
– 2Δy - 2Δx: -4
• Calculate the initial decision parameter p0:
– p0 = 2Δy – Δx = 6
Bresenham Example
• We plot the initial point (x0 , y0)=(20,10) and determine
successive pixel positions along the line path from the decision
parameter as
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)
Bresenham Example (cont…)
17
16
15
14
13
12
11
10
18
29
27
26
25
24
23
22
21
20 28 30
k pk (xk+1,yk+1)
0
1
2
3
4
5
6
7
8
9
Digital Differential Analyzer
Line Drawing Algorithm
Bresenhams Line Drawing Algorithm
Arithmetic DDA algorithm uses floating points i.e. Real Arithmetic.
Bresenhams algorithm uses fixed points
i.e. Integer Arithmetic.
Operations
DDA algorithm uses multiplication and division in its
operations.
Bresenhams algorithm uses only
subtraction and addition in its operations.
Speed
DDA algorithm is rather slowly than Bresenhams algorithm in
line drawing because it uses real arithmetic (floating-point
operations).
Bresenhams algorithm is faster than DDA
algorithm in line drawing because it
performs only addition and subtraction in its
calculation and uses only integer arithmetic
so it runs significantly faster.
Accuracy & Efficiency
DDA algorithm is not as accurate and efficient as Bresenham
algorithm.
Bresenhams algorithm is more efficient and
much accurate than DDA algorithm.
Drawing
DDA algorithm can draw circles and curves but that are not as
accurate as Bresenhams algorithm.
Bresenhams algorithm can draw circles and
curves with much more accuracy than DDA
algorithm.
Round Off
DDA algorithm round off the coordinates to integer that is
nearest to the line.
Bresenhams algorithm does not round off
but takes the incremental value in its
operation.
Expensive
DDA algorithm uses an enormous number of floating-point
multiplications so it is expensive.
Bresenhams algorithm is less expensive
than DDA algorithm as it uses only addition
and subtraction.
Difference Between DDA Line Drawing Algorithm and Bresenhams Line Drawing Algorithm.
ANTI ALIASING Algorithm
Aliasing in computer graphics manifests in several ways.
The computer generated image will have jagged edges and incorrectly rendered fine detail or
texture.
Ant aliasing is the technique adopted to solve these problems.
One technique is to increase the sampling rate by increasing the resolution of the raster.
Another method is to calculate the raster at higher resolution and display it at lower resolution
by averaging the pixel and attribute at the lower resolution.
Graphics system consists of four subsystems:
a. Geometry engine subsystem
b. Scan conversion subsystem
c. Raster subsystem
d. Display subsystem
GEOMETRY ENGINE
• The geometry engine accepts 3-D world co-ordinate data
and converts them into X, Y screen co-ordinates.
• Depth information is manipulated using Z-buffer.
• Colors are also processed.
• The geometry pipeline facilitates among other functions
lighting, clipping,and 3D to 2D projection, viewing
transformations, rotation, scaling and translation.
SCAN CONVERSION
The scan conversion subsystem carries out
polygon decomposition
edge slope calculations
span slope calculations and span interpolation
.
The output of the scan
conversion is the
pixel information to the raster
subsystem
RASTER SUBSYSTEM
• The raster subsystem will have usually 24 bit planes.
This will provide eight bit planes for each primary
color (RGB)
• In a typical raster engine five 256K X 4D RAM provide
4 bits of Z-depth.
• The raster information is stored in the frame buffer.
• Twenty 64 K X 4 video RAM provide 4 bits for each
pixel of 1280 X 1024 resolution.
• Entry level systems will have 12 bit planes and high
end systems will have 32 bit planes for the frame
buffer.
DISPLAY SUBSYSTEM
The display subsystem has multi-mode graphics
processors which manage the display, send the Red,
Green, Blue color (RGB) data to the respective
digital to analog converters as well as provide a
video output.
The display devices are classified into two groups:
i. Display devices based on CRT principle
ii. Flat screens
In a color CRT, there are three electron guns, one each for red, green
and blue.
The phosphor dots for red, green and blue are arranged in a triangular
pattern. The individual beams intersect at a shadow mask which directs
a red beam to a red phosphor dot and so on.
Raster Scan technique
• A frame buffer is a common method of implementing a raster CRT
graphics device.
• It can be considered to be a large contiguous piece of computer
memory. In the simplest , there can be one memory bit for each
pixel in the raster. This amount of memory is called a bit plane.
• The picture is built in the frame buffer one bit at a time. The
memory bits can be either in 0 or 1 state.
• If a particular pixel is to be addressed, the corresponding bit in the
frame buffer is changed from 0 to 1.
• Since the raster CRT is an analog device, it requires an electrical
voltage and the digital data of the frame buffer has to be converted
to an analog voltage through a digital to analog converter (DAC).
A Single bit frame buffer
A four bit plane frame buffer
FLAT SCREENS
• CRT has the disadvantage that it is extremely
bulky. Moreover, CRT consumes considerable
power with increased heat dissipation
requirements.
• Portability is reduced because of the size and the
material of CRT.
• These disadvantages have prompted the
manufacturers try different types of flat screens
as output devices for computers.
• Flat screens are necessary for laptop, notebook
and palm top computers. Flat screens operate on
the principle of liquid crystal display/LED
We can separate flat-panel displays into two categories: emissive
displays and nonemissive displays.
The emissive displays (or emitters) are devices that displays, and light-
emitting diodes are examples of emissive displays.
Nonemissive displays( or nonemitters) use optical effects to convert
sunlight or light from some other source into graphics patterns. The
most important example of a nonemissive flat-panel display is a
liquid- crystal device.
emissive device is the light-emitting diode (LED). A matrix of diodes is
arranged to form the pixel positions in the display, and picture
defination is stored in refresh buffer. As in scan- line refreshing of a
CRT, information is read from the refresh buffer and converted to
voltage levels that are applied to the diodes to produce the light
patterns in the display.
Liquid- crystal displays (LCDs) are commonly used in systems, such
as calculators (fig.below) and portable, laptop computers (fig.below).
These nonemissive devices produce a picture by passing polarized
light from the surrounding or from an internal light source through a
liquid- crystal material that can be aligned to either block or transmit
the light.

More Related Content

Similar to Mod 2 hardware_graphics.pdf

graphics processing unit ppt
graphics processing unit pptgraphics processing unit ppt
graphics processing unit pptNitesh Dubey
 
Backend.AI Technical Introduction (19.09 / 2019 Autumn)
Backend.AI Technical Introduction (19.09 / 2019 Autumn)Backend.AI Technical Introduction (19.09 / 2019 Autumn)
Backend.AI Technical Introduction (19.09 / 2019 Autumn)Lablup Inc.
 
Graphics hardware and introduction to Raster display system
Graphics hardware and introduction to Raster display systemGraphics hardware and introduction to Raster display system
Graphics hardware and introduction to Raster display systemmahamiqbalrajput
 
CAD STANDARDS - SMART MANUFACTURING MECH
CAD STANDARDS - SMART MANUFACTURING MECHCAD STANDARDS - SMART MANUFACTURING MECH
CAD STANDARDS - SMART MANUFACTURING MECHRAJESHS631800
 
Graphics processing unit (GPU)
Graphics processing unit (GPU)Graphics processing unit (GPU)
Graphics processing unit (GPU)Amal R
 
Nvidia (History, GPU Architecture and New Pascal Architecture)
Nvidia (History, GPU Architecture and New Pascal Architecture)Nvidia (History, GPU Architecture and New Pascal Architecture)
Nvidia (History, GPU Architecture and New Pascal Architecture)Saksham Tanwar
 
The Basics of Cell Computing Technology
The Basics of Cell Computing TechnologyThe Basics of Cell Computing Technology
The Basics of Cell Computing TechnologySlide_N
 
Stream Processing
Stream ProcessingStream Processing
Stream Processingarnamoy10
 
Graphics Standards and Algorithm
Graphics Standards and AlgorithmGraphics Standards and Algorithm
Graphics Standards and AlgorithmYatin Singh
 
PLM and CAD hardware
PLM and CAD hardwarePLM and CAD hardware
PLM and CAD hardwarenmahi96
 
[Unite Seoul 2019] Mali GPU Architecture and Mobile Studio
[Unite Seoul 2019] Mali GPU Architecture and Mobile Studio [Unite Seoul 2019] Mali GPU Architecture and Mobile Studio
[Unite Seoul 2019] Mali GPU Architecture and Mobile Studio Owen Wu
 
High performance computing with accelarators
High performance computing with accelaratorsHigh performance computing with accelarators
High performance computing with accelaratorsEmmanuel college
 
Volume 2-issue-6-2040-2045
Volume 2-issue-6-2040-2045Volume 2-issue-6-2040-2045
Volume 2-issue-6-2040-2045Editor IJARCET
 

Similar to Mod 2 hardware_graphics.pdf (20)

graphics processing unit ppt
graphics processing unit pptgraphics processing unit ppt
graphics processing unit ppt
 
Kompüter Qrafikasına giriş
Kompüter Qrafikasına girişKompüter Qrafikasına giriş
Kompüter Qrafikasına giriş
 
cad_theory.ppt
cad_theory.pptcad_theory.ppt
cad_theory.ppt
 
Backend.AI Technical Introduction (19.09 / 2019 Autumn)
Backend.AI Technical Introduction (19.09 / 2019 Autumn)Backend.AI Technical Introduction (19.09 / 2019 Autumn)
Backend.AI Technical Introduction (19.09 / 2019 Autumn)
 
GPU - Basic Working
GPU - Basic WorkingGPU - Basic Working
GPU - Basic Working
 
Graphics hardware and introduction to Raster display system
Graphics hardware and introduction to Raster display systemGraphics hardware and introduction to Raster display system
Graphics hardware and introduction to Raster display system
 
CAD STANDARDS - SMART MANUFACTURING MECH
CAD STANDARDS - SMART MANUFACTURING MECHCAD STANDARDS - SMART MANUFACTURING MECH
CAD STANDARDS - SMART MANUFACTURING MECH
 
Graphics processing unit (GPU)
Graphics processing unit (GPU)Graphics processing unit (GPU)
Graphics processing unit (GPU)
 
Nvidia (History, GPU Architecture and New Pascal Architecture)
Nvidia (History, GPU Architecture and New Pascal Architecture)Nvidia (History, GPU Architecture and New Pascal Architecture)
Nvidia (History, GPU Architecture and New Pascal Architecture)
 
Introduction to Blackfin BF532 DSP
Introduction to Blackfin BF532 DSPIntroduction to Blackfin BF532 DSP
Introduction to Blackfin BF532 DSP
 
An35225228
An35225228An35225228
An35225228
 
The Basics of Cell Computing Technology
The Basics of Cell Computing TechnologyThe Basics of Cell Computing Technology
The Basics of Cell Computing Technology
 
Stream Processing
Stream ProcessingStream Processing
Stream Processing
 
Graphics Standards and Algorithm
Graphics Standards and AlgorithmGraphics Standards and Algorithm
Graphics Standards and Algorithm
 
chameleon chip
chameleon chipchameleon chip
chameleon chip
 
PLM and CAD hardware
PLM and CAD hardwarePLM and CAD hardware
PLM and CAD hardware
 
Par com
Par comPar com
Par com
 
[Unite Seoul 2019] Mali GPU Architecture and Mobile Studio
[Unite Seoul 2019] Mali GPU Architecture and Mobile Studio [Unite Seoul 2019] Mali GPU Architecture and Mobile Studio
[Unite Seoul 2019] Mali GPU Architecture and Mobile Studio
 
High performance computing with accelarators
High performance computing with accelaratorsHigh performance computing with accelarators
High performance computing with accelarators
 
Volume 2-issue-6-2040-2045
Volume 2-issue-6-2040-2045Volume 2-issue-6-2040-2045
Volume 2-issue-6-2040-2045
 

Recently uploaded

CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfCCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfAsst.prof M.Gokilavani
 
Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineeringmalavadedarshan25
 
Concrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxConcrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxKartikeyaDwivedi3
 
Work Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvvWork Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvvLewisJB
 
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxwendy cai
 
Effects of rheological properties on mixing
Effects of rheological properties on mixingEffects of rheological properties on mixing
Effects of rheological properties on mixingviprabot1
 
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)Dr SOUNDIRARAJ N
 
complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...asadnawaz62
 
Introduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptxIntroduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptxk795866
 
Churning of Butter, Factors affecting .
Churning of Butter, Factors affecting  .Churning of Butter, Factors affecting  .
Churning of Butter, Factors affecting .Satyam Kumar
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort servicejennyeacort
 
Heart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxHeart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxPoojaBan
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerAnamika Sarkar
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfAsst.prof M.Gokilavani
 
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdfCCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdfAsst.prof M.Gokilavani
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024Mark Billinghurst
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AIabhishek36461
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile servicerehmti665
 

Recently uploaded (20)

CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfCCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
 
Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineering
 
Concrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxConcrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptx
 
Work Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvvWork Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvv
 
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Serviceyoung call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
 
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptx
 
Effects of rheological properties on mixing
Effects of rheological properties on mixingEffects of rheological properties on mixing
Effects of rheological properties on mixing
 
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
 
complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...
 
Introduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptxIntroduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptx
 
Churning of Butter, Factors affecting .
Churning of Butter, Factors affecting  .Churning of Butter, Factors affecting  .
Churning of Butter, Factors affecting .
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
 
Heart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxHeart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptx
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
 
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdfCCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AI
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile service
 

Mod 2 hardware_graphics.pdf

  • 1. Computer Graphics Software/hardware Visualisation Windowing and clipping Lighting and shading Hidden surface and solid removal Color models
  • 2. CAPABILITIES FOR MODELING IN A TYPICAL GRAPHICS WORKSTATION ENVIRONMENT a. 2D and 3D modeling and drafting facilities b. Display of text c. Animation d. Color selection (usually a palette of 256 colors) e. 3D viewing f. Z-buffering g. Gouraud shading h. Depth cueing i. Lighting models j. Anti-aliasing k. Texture mapping
  • 3. ARCHITECTURE OF A TYPICAL GRAPHICS WORKSTATION A color (RGB) monitors with 19" screen size and resolution of 1280 x1024 pixels is the standard. Some workstations will have monitors with resolution of 1920 x 1200 pixels CPU board with a RISC (Reduced Instruction Set Computing) Microprocessor with Cache Memory and 4/8 GB RAM. HDD 1 TB communication facilities display generation and manipulation.
  • 4. Workstations consist of three basic components A primary processor Associated memory Graphics display system and software Leading workstations like SUN, IBM, Silicon Graphics, Hewlett-Packard etc., use special architecture based on RISC (Reduced Instruction Set Computing) chips and specialized graphic boards.
  • 5. The graphic features like display manipulation are realized in hardware for fast response. Workstations typically place emphasis on graphics display and manipulation. The features of a display system are directly related to Functions such as color fill; entity generation and transformation of displays are controlled by the display processor and associated hardware.
  • 6. CAD systems are no more than computer programs. The software comprises a number of different elements or functions that process the data stored in the database in different ways. Main Functions of CAD Systems 1. Model definition: for example to add geometric elements to a model 2. Model manipulation: to move, copy, delete, edit or otherwise modify elements in the design model. 3. Picture generation: to generate images of the design model on a computer screen or on some hard-copy device. 4. User interaction: to handle commands input by the user and to present output to the user about the operation of the system. 5. Database management: for the management of the files that make up the DB. 6. Applications: these elements of the software do not modify the design model, but use it to generate information for evaluation, analysis or manufacture. 7. Utilities: a “catch-all” term for parts of the software that do not directly affect the design model, but modify the operation of the system in some way (for example, to select the color to be used for display, or the units to be used for construction of a drawing). These features may be provided by multiple programs operating on a common database, or by a single program encompassing all of the elements.
  • 7. What is GPU Computing? GPU computing is the use of a GPU (graphics processing unit) as a co-processor to accelerate CPUs for general-purpose scientific and engineering computing. The GPU accelerates applications running on the CPU by offloading some of the compute-intensive and time consuming portions of the code. The rest of the application still runs on the CPU. From a user’s perspective, the application runs faster because it’s using the massively parallel processing power of the GPU to boost performance. This is known as “heterogeneous” or “hybrid” computing. A CPU consists of four to eight CPU cores, while the GPU consists of hundreds of smaller cores. Together, they operate to crunch through the data in the application. This massively parallel architecture is what gives the GPU its high compute performance. There are a number of GPU-accelerated applications that provide an easy way to access high-performance computing (HPC).
  • 8. Application developers harness the performance of the parallel GPU architecture using a parallel programming model invented by NVIDIA called “CUDA.” All NVIDIA GPUs—GeForce®, Quadro®, and Tesla®--support the NVIDIA® CUDA® parallel- programming model. WHAT IS CUDA? CUDA™ is a parallel computing platform and programming model invented by NVIDIA. It enables dramatic increases in computing performance by harnessing the power of the graphics processing unit (GPU). Identify hidden plaque in arteries: Heart attacks are the leading cause of death worldwide. Harvard Engineering, Harvard Medical School and Brigham & Women's Hospital have teamed up to use GPUs to simulate blood flow and identify hidden arterial plaque without invasive imaging techniques or exploratory surgery. The latest Tesla 20-series GPUs are based on the latest implementation of the CUDA platform called the “Fermi architecture ”. Fermi has key computing features such as 500+ gigaflops of IEEE standard double-precision floating-point hardware support, L1 and L2 caches, ECC memory error protection, local user-managed data caches in the form of shared memory dispersed throughout the GPU, coalesced memory accesses, and more.
  • 9. What are the difference between Cloud, Cluster and Grid Computing? All three systems are distributed and share similar characteristics. The similarities relate to resource pooling and broad network access – two criteria that are fulfilled by all systems. Network access to cluster and grid computing systems usually takes place within a corporate network, while the services of a cloud computing system can also be accessed through public network, i.e. the Internet. Resources in grid and cluster environments are generally pre-reserved, while cloud computing systems are demand driven, i.e. operation of these systems is geared to consumers’ actual needs. Another difference concerns the “rapid elasticity” criterion, which forms an integral part of cloud computing systems but is not normally supported by cluster or grid systems. Compared to other distributed systems such as grids or clusters, cloud computing solutions give enterprises significantly more flexibility. They can dispense with IT infrastructures of their own and only have to pay for the resources and services they actually use (“pay-per-use”/ “pay as you go)
  • 10. Two interactive operations that carried out in CAD: * Redrawing of the display to “clean-up” unwanted clutter on the screen or to restore parts of the image that have been corrupted. *Selection of entities from the screen. In each of these cases, work is not just done with the base entity data, but with a display file that stores the displayable vectors for an entity. For example, in the selection of a surface without use of a display file it would be necessary to recompute the surface display in order to identify which path is nearest to the cursor. With a display file it is only necessary to find the nearest displayed vector and to cross-reference back to the entity. Display files also lend themselves to fast image manipulation or zoom facilities. Instead of recomputing the entire image for a zoom within existing window boundary, the display file vectors are used- leading to some loss in display resolution for curves, but generally faster display control. The display file is related to the rest of the data by cross-referencing between the display file and the entity table.
  • 12. RASTER SCAN TECHNIQUE • The screen of a monitor can be considered to consist of a large number of minute subdivisions called picture elements (pixels, in short). • For example, in a typical SVGA monitor, the screen is divided horizontally into 1024 units and vertically into 768 units. • The resolution of this monitor is then 1024 x 768. • A raster CRT graphics device can be considered a matrix of discrete cells each of which can be made bright. • Thus it is basically a point plotting device. If a line is to be drawn, it can be approximated by a series of dots close to the path of the line.
  • 13. • A frame buffer is a common method of implementing a raster CRT graphics device. • It can be considered to be a large contiguous piece of computer memory. In the simplest can, there can be one memory bit for each pixel in the raster. This amount of memory is called a bit plane. • A 320 X 200 raster requires 64 K memory bits in a single plane. The picture is built in the frame buffer one bit at a time. The memory bits can be either in 0 or 1 state. • If a particular pixel is to be addressed, the corresponding bit in the frame buffer is changed from 0 to 1. • Since the raster CRT is an analog device, it requires an electrical voltage and the digital data of the frame buffer has to be converted to an analog voltage through a digital to analog converter (DAC).
  • 14. • Additional bit planes can be used for each of the three color guns. In a 24 bit plane buffer 8 bit planes are used for each color. • Each group drives a 8 bit Digital to Analog Converter (DAC) and can generate 28 = 256 intensities of red, green and blue. This when combined together can result in (28)3 = 16, 777, 216 or 16.7 million possible colors.
  • 15. A drawing is created by an assembly of basic entities Points Lines Arcs Circles The fundamental principles of generation of some of these entities are discussed in this lecture -Point plotting -Line/Circle plotting
  • 16. POINT PLOTTING -The frame buffer display is an example of a point plotting device. - The smallest unit accepted by such displays is a single pixel. - To construct a useful picture on a point plotting device, a picture must be built out of several hundreds of pixels. A Framebuffer is a video output device that drives a video display from a memory buffer containing a complete frame of data. The information in the memory buffer typically consists of color values for every pixel (point that can be displayed) on the screen. Electron beam (if the display technology uses one) is commanded to trace a left-to-right, top-to-bottom path across the entire screen, the way a television renders a broadcast signal. At the same time, the color information for each point on the screen is pulled from the framebuffer, creating a set of discrete picture elements
  • 17. DRAWING OF LINES Straight line segments are used a great deal in computer generated pictures. The following criteria have been stipulated for line drawing displays : • i. Lines should appear straight • ii. Lines should terminate accurately • iii. Lines should have constant density • iv. Line density should be independent of length and angle • v. Line should be drawn rapidly There are several schemes for selecting the pixels between the end pixels. One method of generating a line segment is a Symmetrical Digital differential analyzer (DDA) and other is Breshanhams algorithm
  • 18. Line Drawing Algorithms • Line drawn as pixels • Graphics system – Projects the endpoints to their pixel locations in the frame buffer (screen coordinates as integers) – Finds a path of pixels between the two – Loads the color – Plots the line on the monitor from frame buffer (video controller) – Rounding causes all lines except horizontal or vertical to be displayed as jigsaw appearance (low resolution) – Improvement: high resolution, or adjust pixel intensities on the line path. 10/10/2006 TCSS458A Isabelle Bichindaritz 18
  • 19. Line Drawing Algorithms • Line equation – Slope-intercept form y = m . X + c slope m and Y-intercept c – Slope – Y-intercept 19 0 0 mx - y = c x y 0 end 0 end = x - x y - y = m  
  • 20. Line Drawing Algorithms • DDA (Digital Differential Analyzer) – Scan conversion line algorithm – Line sampled at regular intervals of x, then corresponding y is calculated – From left to right – The calculation has to be simplified as below 20 ) 1 = ( m 1 + x = x 1.0, m if ) 1 = ( m + y = y 1, > m if y k 1 + k x k 1 + k   
  • 21. 10/10/2006 TCSS458A Isabelle Bichindaritz 21
  • 22. Line Drawing Algorithms • Advantage – Does not calculate coordinates based on the complete equation (uses offset method) • Disadvantage – Round-off errors are accumulated, thus line diverges more and more from straight line – Round-off operations take time • Perform integer arithmetic by storing float as integers in numerator and denominator and performing integer artithmetic. 22
  • 23. DDA ALGORITHM The digital differential analyzer generates lines from their differential equations. The DDA works on the principle that X and Y are simultaneously incremented by small steps proportional to the first derivatives of X and Y. begin length : = abs (X2– X1) ; if abs (Y2–Y1) < length then length: = abs (Y2–Y1); X - incr : = (X2 – X1) /length ; Y - incr : = (Y2 – Y1) /length ; X : = X1 + 0.5 ; Y = Y1 + 0.5 ; for i : = 1 to length do begin plot (trunc (X) ; trunc(Y) ; X : = X + X - incr ; Y : = Y + Y - incr ; end; end.
  • 24. Merits + Demerits • Faster than the direct use of line Eqn. • It eliminates the multiplication in line Eqn. • For long line segments, the true line Path may be mislead due to round off. • Rounding operations and floating-point arithmetic are still time consuming. • The algorithm can still be improved. • Other algorithms, with better performance also exist.
  • 25. Line Drawing Algorithms • Bresenham’s line drawing – Efficient line drawing algorithm using only incremental integer calculations – Can be adapted to draw circles and other curves • Principle – Vertical axes show scan line positions – Horizontal axes show pixel columns – At each step, determine the best next pixel based on the sign of an integer parameter whose value is proportional to the difference between the vertical separations of the two pixel positions from the actual line. 25
  • 26. The Bresenham Line Algorithm • The Bresenham algorithm is another incremental scan conversion algorithm • The big advantage of this algorithm is that it uses only integer calculations Jack Bresenham worked for 27 years at IBM b e f o r e e n t e r i n g academia. Bresenham developed his famous algorithms at IBM in the e a r l y 1 9 6 0 s
  • 27. The Big Idea • Move across the x axis in unit intervals and at each step choose between two different y coordinates 2 3 4 5 2 4 3 5 For example, from position (2, 3) we have to choose between (3, 3) and (3, 4) We would like the point that is closer to the original line (xk, yk) (xk+1, yk) (xk+1, yk+1)
  • 28. The y coordinate on the mathematical line at xk+1 is: Deriving The Bresenham Line Algorithm • At sample position xk+1 the vertical separations from the mathematical line are labelled dupper and dlower b x m y k    ) 1 ( y yk yk+1 xk+1 dlower dupper
  • 29. • So, dupper and dlower are given as follows: • and: • We can use these to make a simple decision about which pixel is closer to the mathematical line Deriving The Bresenham Line Algorithm (cont…) k lower y y d   k k y b x m     ) 1 ( y y d k upper    ) 1 ( b x m y k k      ) 1 ( 1
  • 30. BRESENHAM’S LINE DRAWING ALGORITHM (for |m| < 1.0) 1. Input the two line end-points, storing the left end-point in (x0, y0) 2. Plot the point (x0, y0) 3. Calculate the constants Δx, Δy, 2Δy, and (2Δy - 2Δx) and get the first value for the decision parameter as: 4. At each xk along the line, starting at k = 0, perform the following test. If pk < 0, the next point to plot is (xk+1, yk) and: x y p     2 0 y p p k k     2 1
  • 31. The Bresenham Line Algorithm (cont…) The algorithm and derivation above assumes slopes are less than 1. for other slopes we need to adjust the algorithm slightly Otherwise, the next point to plot is (xk+1, yk+1) and: 5. Repeat step 4 (Δx – 1) times x y p p k k       2 2 1
  • 32. Bresenham Example • Let’s have a go at this • Let’s plot the line from (20, 10) to (30, 18) • First off calculate all of the constants: – Δx: 10 – Δy: 8 – 2Δy: 16 – 2Δy - 2Δx: -4 • Calculate the initial decision parameter p0: – p0 = 2Δy – Δx = 6
  • 33. Bresenham Example • We plot the initial point (x0 , y0)=(20,10) and determine successive pixel positions along the line path from the decision parameter as 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)
  • 35. Digital Differential Analyzer Line Drawing Algorithm Bresenhams Line Drawing Algorithm Arithmetic DDA algorithm uses floating points i.e. Real Arithmetic. Bresenhams algorithm uses fixed points i.e. Integer Arithmetic. Operations DDA algorithm uses multiplication and division in its operations. Bresenhams algorithm uses only subtraction and addition in its operations. Speed DDA algorithm is rather slowly than Bresenhams algorithm in line drawing because it uses real arithmetic (floating-point operations). Bresenhams algorithm is faster than DDA algorithm in line drawing because it performs only addition and subtraction in its calculation and uses only integer arithmetic so it runs significantly faster. Accuracy & Efficiency DDA algorithm is not as accurate and efficient as Bresenham algorithm. Bresenhams algorithm is more efficient and much accurate than DDA algorithm. Drawing DDA algorithm can draw circles and curves but that are not as accurate as Bresenhams algorithm. Bresenhams algorithm can draw circles and curves with much more accuracy than DDA algorithm. Round Off DDA algorithm round off the coordinates to integer that is nearest to the line. Bresenhams algorithm does not round off but takes the incremental value in its operation. Expensive DDA algorithm uses an enormous number of floating-point multiplications so it is expensive. Bresenhams algorithm is less expensive than DDA algorithm as it uses only addition and subtraction. Difference Between DDA Line Drawing Algorithm and Bresenhams Line Drawing Algorithm.
  • 36. ANTI ALIASING Algorithm Aliasing in computer graphics manifests in several ways. The computer generated image will have jagged edges and incorrectly rendered fine detail or texture. Ant aliasing is the technique adopted to solve these problems. One technique is to increase the sampling rate by increasing the resolution of the raster. Another method is to calculate the raster at higher resolution and display it at lower resolution by averaging the pixel and attribute at the lower resolution.
  • 37. Graphics system consists of four subsystems: a. Geometry engine subsystem b. Scan conversion subsystem c. Raster subsystem d. Display subsystem GEOMETRY ENGINE • The geometry engine accepts 3-D world co-ordinate data and converts them into X, Y screen co-ordinates. • Depth information is manipulated using Z-buffer. • Colors are also processed. • The geometry pipeline facilitates among other functions lighting, clipping,and 3D to 2D projection, viewing transformations, rotation, scaling and translation.
  • 38. SCAN CONVERSION The scan conversion subsystem carries out polygon decomposition edge slope calculations span slope calculations and span interpolation . The output of the scan conversion is the pixel information to the raster subsystem
  • 39. RASTER SUBSYSTEM • The raster subsystem will have usually 24 bit planes. This will provide eight bit planes for each primary color (RGB) • In a typical raster engine five 256K X 4D RAM provide 4 bits of Z-depth. • The raster information is stored in the frame buffer. • Twenty 64 K X 4 video RAM provide 4 bits for each pixel of 1280 X 1024 resolution. • Entry level systems will have 12 bit planes and high end systems will have 32 bit planes for the frame buffer.
  • 40. DISPLAY SUBSYSTEM The display subsystem has multi-mode graphics processors which manage the display, send the Red, Green, Blue color (RGB) data to the respective digital to analog converters as well as provide a video output.
  • 41. The display devices are classified into two groups: i. Display devices based on CRT principle ii. Flat screens In a color CRT, there are three electron guns, one each for red, green and blue. The phosphor dots for red, green and blue are arranged in a triangular pattern. The individual beams intersect at a shadow mask which directs a red beam to a red phosphor dot and so on.
  • 42. Raster Scan technique • A frame buffer is a common method of implementing a raster CRT graphics device. • It can be considered to be a large contiguous piece of computer memory. In the simplest , there can be one memory bit for each pixel in the raster. This amount of memory is called a bit plane. • The picture is built in the frame buffer one bit at a time. The memory bits can be either in 0 or 1 state. • If a particular pixel is to be addressed, the corresponding bit in the frame buffer is changed from 0 to 1. • Since the raster CRT is an analog device, it requires an electrical voltage and the digital data of the frame buffer has to be converted to an analog voltage through a digital to analog converter (DAC). A Single bit frame buffer A four bit plane frame buffer
  • 43. FLAT SCREENS • CRT has the disadvantage that it is extremely bulky. Moreover, CRT consumes considerable power with increased heat dissipation requirements. • Portability is reduced because of the size and the material of CRT. • These disadvantages have prompted the manufacturers try different types of flat screens as output devices for computers. • Flat screens are necessary for laptop, notebook and palm top computers. Flat screens operate on the principle of liquid crystal display/LED
  • 44. We can separate flat-panel displays into two categories: emissive displays and nonemissive displays. The emissive displays (or emitters) are devices that displays, and light- emitting diodes are examples of emissive displays. Nonemissive displays( or nonemitters) use optical effects to convert sunlight or light from some other source into graphics patterns. The most important example of a nonemissive flat-panel display is a liquid- crystal device. emissive device is the light-emitting diode (LED). A matrix of diodes is arranged to form the pixel positions in the display, and picture defination is stored in refresh buffer. As in scan- line refreshing of a CRT, information is read from the refresh buffer and converted to voltage levels that are applied to the diodes to produce the light patterns in the display. Liquid- crystal displays (LCDs) are commonly used in systems, such as calculators (fig.below) and portable, laptop computers (fig.below). These nonemissive devices produce a picture by passing polarized light from the surrounding or from an internal light source through a liquid- crystal material that can be aligned to either block or transmit the light.