2.0

2.0 | 1 rating Rate this file 10 Downloads (last 30 days) File Size: 1.92 KB File ID: #25544
image thumbnail

Line Drawing by Bresenham Algorithm

by Chandan

 

11 Oct 2009

Bresenham Line drawing Algorithm uses error for next pixel to decide its course.

| Watch this File

File Information
Description

This code implements Bresenham Line Algorithm with slight modification of error term in respect of computation efficiency that it does not require any division process. Hence it is more efficient. Also it has been generalized to draw lines of any slope. Point input order is thus insignificant. I hope this code would be helpful.

MATLAB release MATLAB 7.1.0 (R14SP3)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (1)
21 Jan 2010 Pat Finder

I looked at this to routine as a way to use a low-level command to draw a line w/o the anti-aliasing that is used by the plot() routine.

However, under the covers, this routine calls 'plot()'.
So, it doesn't help avoid anti-aliasing.

Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
mathematics Chandan 12 Oct 2009 12:46:27
computer graphics Chandan 12 Oct 2009 12:46:27
game graphics Chandan 12 Oct 2009 12:46:28
bresenham line algorithm Chandan 12 Oct 2009 12:46:28
line drawing Chandan 12 Oct 2009 12:46:28

Contact us at files@mathworks.com