This code uses Bresenham line generation algorithm to generate a line, with modified expression for error calculation which does not involves any division or calculation of slope of line. This parameter is however modified by same mechanism as original algorithm but with different value than actual Bresenham algorithm.
This code is generalized in terms of order of input of first point followed by second point or vice versa. Also result is shown in two different form namely, the point form and line segment form.
Any comments and or suggestions for improvement would be appreciated.
Chandan Kumar (2021). Bresenham line generation (https://www.mathworks.com/matlabcentral/fileexchange/25543-bresenham-line-generation), MATLAB Central File Exchange. Retrieved .
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!