This code does not use any for loops and takes advantage of Matlabs internally optimized routines to produce a fast, optimized version of Bresenham's line drawing algorithm
Aaron Wetzler (2021). Bresenham optimized for Matlab (https://www.mathworks.com/matlabcentral/fileexchange/28190-bresenham-optimized-for-matlab), MATLAB Central File Exchange. Retrieved .
Readability is not so good! But I appreciate your work. Thanks.
Missing a couple of terminating ';', but I don't care _because it works_ .
Excellent, especially because he will work with negative values!
I believe cumsum(q) is equivalent to round(0:(dy/dx):dy), anyway, I posted some code at: stackoverflow.com/a/43726466/2093077 that uses same logic but is about 20% faster.
What does this equation mean?
Very efficient, and well made. Code comments messy, and lines not terminated with ;.
compact and elegant implementation
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!