computer graphics presentation

18
Shri Vaishnav Institute Of Management Presentation On Computer Graphics

Upload: lokendra-prajapati

Post on 01-Jul-2015

198 views

Category:

Science


10 download

DESCRIPTION

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

TRANSCRIPT

Page 1: Computer graphics presentation

Shri Vaishnav Institute Of Management

Presentation On Computer Graphics

Page 2: Computer graphics presentation

Applications Of Computer

Graphics

Frame Buffer

Line Algorithm

Page 3: Computer graphics presentation
Page 4: Computer graphics presentation

Computer Aided Design

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

Optimization of Design.

Page 5: Computer graphics presentation

Visualization

Visualization is any Technique For Creating Images , Diagrams or Animations

To Communicate A Message.

Page 6: Computer graphics presentation

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.

Page 7: Computer graphics presentation

Computer GamesComputer Games are Video Games played on a

General Purpose Personal Computer

Page 8: Computer graphics presentation

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.

Page 9: Computer graphics presentation

LINE DRAWING ALGORITHM

Page 10: Computer graphics presentation

Line Drawing Algorithm

There are two basic line drawing algorithm…..

DDA Line Drawing Algorithm

Bresenham’s Line Drawing Algorithm

Page 11: Computer graphics presentation

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

Page 12: Computer graphics presentation

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

87654321

(3,2)(9,6)

DDA Line Drawing Algorithm

Page 13: Computer graphics presentation

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)…

Page 14: Computer graphics presentation

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

Page 15: Computer graphics presentation

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

Page 16: Computer graphics presentation

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

Page 17: Computer graphics presentation

REFRANCE

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

Page 18: Computer graphics presentation

Presentation Powered By :

Ashish Sharma

Lokendra Prajapati