Article ID | Journal | Published Year | Pages | File Type |
---|---|---|---|---|
418622 | Discrete Applied Mathematics | 2015 | 12 Pages |
Given a digital straight line DD of known characteristics (a,b,c)(a,b,c), and given two arbitrary discrete points A(xa,ya)A(xa,ya) and B(xb,yb)B(xb,yb) of it, we are interested in computing the characteristics of the digital straight segment (DSS) of DD delimited by the endpoints AA and BB. 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).