M-File Help: bresenham View code for bresenham

bresenham

Generate a line

p = bresenham(x1, y1, x2, y2) is a list of integer coordinates for points lying on the line segement (x1,y1) to (x2,y2). Endpoints must be integer.

p = bresenham(p1, p2) as above but p1=[x1,y1] and p2=[x2,y2].

See also

icanvas


 

© 1990-2012 Peter Corke.