Remainder approach for the computation of digital straight line subsegment characteristics - Ouattara, Jean Serge Dimitri; Andres, Eric; Largeteau-Skapin, Gaëlle; Zrour, Rita; Tapsoba, Théodore Marie-Yves (Discrete Applied Mathematics, 2015)
Given a digital straight line D of known characteristics (a,b,c), and given two arbitrary discrete points A(xa,ya) and B(xb,yb) of it, we are interested in computing the characteristics of the digital straight segment (DSS) of D delimited by the endpoints A and B. Our method is based entirely on the remainder subsequence S={ax−cmodb;xa≤x≤xb}. We show that minimum and maximum remainders correspond to the three leaning points of the subsegment needed to determine its characteristics. One of the key aspects of the method is that we show that computing such a minimum and maximum of a remainder sequence can be done in logarithmic time with an algorithm akin to the Euclidean algorithm. Experiments show that our algorithm is faster than the previous ones proposed in Lachaud and Said (2013) and in Sivignon (2013).