Upcoming SlideShare
×

# Line drawing algorithms

1,777 views
1,623 views

Published on

1 Comment
0 Likes
Statistics
Notes
• Full Name
Comment goes here.

Are you sure you want to Yes No
• Line drawing algorithm with example explained
http://geeksprogrammings.blogspot.com/2014/02/line-drawing-algorithm-cpp.html

Are you sure you want to  Yes  No
• Be the first to like this

Views
Total views
1,777
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
132
1
Likes
0
Embeds 0
No embeds

No notes for slide

### Line drawing algorithms

1. 1. LINE DRAWING ALGORITHMS Presented By Susheel Thakur M.Tech( C.S)-IIIrd Sem Roll No-324
2. 2. Thursday, November 22, 2012 COMPUTER GRAPHICS 2
3. 3. Thursday, November 22, 2012 COMPUTER GRAPHICS 3
4. 4. Thursday, November 22, 2012 COMPUTER GRAPHICS 4
5. 5. Thursday, November 22, 2012 COMPUTER GRAPHICS 5
6. 6. Thursday, November 22, 2012 COMPUTER GRAPHICS 6
7. 7. Thursday, November 22, 2012 COMPUTER GRAPHICS 7
8. 8. Thursday, November 22, 2012 COMPUTER GRAPHICS 8
9. 9. OUTPUT:Thursday, November 22, 2012 COMPUTER GRAPHICS 9
10. 10. Thursday, November 22, 2012 COMPUTER GRAPHICS 10
11. 11. Thursday, November 22, 2012 COMPUTER GRAPHICS 11
12. 12. Thursday, November 22, 2012 COMPUTER GRAPHICS 12
13. 13. AdvantagesFaster than direct use of the line equation. ( without any floating pt multiplication).Simplest Algorithm, doesn’t require special skills for implementation.Thursday, November 22, 2012 COMPUTER GRAPHICS 13
14. 14. DISADVANTAGES:Orientation Dependent, end point accuracy is poor.A floating pt addition is still needed.Thursday, November 22, 2012 COMPUTER GRAPHICS 14
15. 15. 3.BRESENHAM’S LINE ALGORITHM DDA Algo Drawback: Very time consuming- rounding off operation and floating pt arithmetic. Basic Principle: Find optimum raster locations to represent straight lines.  Increment either x or y by one unit depending on the slope of line. Then increment in other variable is found on basis of distance between actual line location and nearest pixel- decision variable or error term.Thursday, November 22, 2012 COMPUTER GRAPHICS 15
16. 16. Thursday, November 22, 2012 COMPUTER GRAPHICS 16
17. 17. Thursday, November 22, 2012 COMPUTER GRAPHICS 17
18. 18. Thursday, November 22, 2012 COMPUTER GRAPHICS 18
19. 19. THANK U Thursday, November 22, 2012 COMPUTER GRAPHICS 19