computer graphics presentation

Post on 01-Jul-2015

198 Views

Category:

Science

10 Downloads

Preview:

Click to see full reader

DESCRIPTION

It is a power point presentation on Computer Graphics...

TRANSCRIPT

Shri Vaishnav Institute Of Management

Presentation On Computer Graphics

Applications Of Computer

Graphics

Frame Buffer

Line Algorithm

Computer Aided Design

Computer Aided Design(CAD) is the Use of Computer System to Assist in the Creation , Modification , Analysis or

Optimization of Design.

Visualization

Visualization is any Technique For Creating Images , Diagrams or Animations

To Communicate A Message.

Animation

Animation is the Process Of Creating a Continuous Motion & Shape Change illusion by means of rapid display of a

Sequence of static Images that Minimally differ from each other.

Computer GamesComputer Games are Video Games played on a

General Purpose Personal Computer

Frame Buffer

A Frame Buffer is a Large , Contiguous Piece of Computer Memory(RAM) that stores Picture Definition. This Memory Area Holds the Set of intensity values for all the Screen points and then retrieved from the frame buffer and painted on the Screen One Row(Scan Line) at a time. Each screen point is referred to as a Pixel or pel or Picture

Element.

LINE DRAWING ALGORITHM

Line Drawing Algorithm

There are two basic line drawing algorithm…..

DDA Line Drawing Algorithm

Bresenham’s Line Drawing Algorithm

DDA Line Drawing Algorithm

Programmer Specifies (x,y) values of end pixels

Need Algorithm to find out which intermediate pixels are on line path

Pixel (x,y) constrained to integer values

Actual Computed intermediate line values

may be floats

Rounding May Be Required

0 1 2 3 4 5 6 7 8 9 10 11 12

87654321

(3,2)(9,6)

DDA Line Drawing Algorithm

DDA Line Drawing Algorithm

DDA stands for “Digital-Differential Analyzer”.It’s a “Scan-Conversion” line drawing algorithm.It’s mainly based on calculating either Δx (dx)or Δy (dy)…

DDA Line Drawing Algorithm

Slope – Intercept Line Equation

y = m . x + b

Given Two End Points (x0,y0) and (x1,y1).

How To Compute m and b ?

(x0,y0)

(x1,y1)

dx

dy

m = dy / dx = (y1 – y0) / (x1 – x0)b = y0 – m * x0

Δy = m * ΔxΔx = Δy/m

DDA Line Drawing Algorithm

If a line with positive slope (+m) or it’s less than and equal to 1(m<=1), then we set ‘x’ at unit interval(Δx=1)And compute each successive ‘y’ value by using following Formula:-

yk+1 = yk + m

Where subscript ‘k’ takes integer values starting from 1,For the first point, and increases by 1 until the final end point is reached..

Left to right

DDA Line Drawing Algorithm

If a line with positive slope (+m) or it’s greater than 1(m>1), then we reverse the rule of ‘x’ and ‘y’, that is set ‘y’ at unit interval(Δy=1) and compute each successive ‘x’ value by using following Formula:-

xk+1 = xk + 1/m

Where subscript ‘k’ takes integer values starting from 1,For the first point, and increases by 1 until the final end point is reached..

Left to right

REFRANCE

BOOK REFRANCE “Computer Graphics C Version” by “Donald Hearn And M. Pauline Baker”.

Presentation Powered By :

Ashish Sharma

Lokendra Prajapati

top related