# Constructing Consistent Digital Line Segments

## Abstract

Our concern is the digitalization of line segments in the unit grid as considered by Chun et al. [Discrete Comput. Geom., 2009], Christ et al. [Discrete Comput. Geom., 2012], and Chowdhury and Gibson [ESA, 2015]. In this setting, digital segments are defined so that they satisfy a set of axioms also satisfied by Euclidean line segments. The key property that differentiates this research from other research in digital line segments is that the intersection of any two segments must be connected. A system of digital line segments that satisfies these desired axioms is called a consistent digital line segments system (CDS). Our main contribution of this paper is to show that any collection of digital segments that satisfy the CDS properties in a finite \(n \times n\) grid graph can be extended to a full CDS (with a segment for every pair of grid points). Moreover, we show that this extension can be computed with a polynomial-time algorithm. The algorithm is such that one can manually define the segments for some subset of the grid. For example, suppose one wants to precisely define the boundary of a digital polygon. Then we would only be interested in CDSes such that the digital line segments connecting the vertices of the polygon fit this desired boundary definition. Our algorithm allows one to manually specify the definitions of these desired segments. For any such definition that satisfies all CDS properties, our algorithm will return in polynomial time a CDS that “fits” with these manually chosen segments.

## References

- 1.Chowdhury, I., Gibson, M.: A characterization of consistent digital linesegments in \(\mathbb{Z}^2\). In: Algorithms - ESA 2015 - 23rd Annual European Symposium,Patras, Greece, 14–16 September 2015, Proceedings, pp. 337–348 (2015)Google Scholar
- 2.Christ, T., Pálvölgyi, D., Stojakovic, M.: Consistent digital line segments. Discrete Comput. Geom.
**47**(4), 691–710 (2012)MathSciNetCrossRefzbMATHGoogle Scholar - 3.Chun, J., Korman, M., Nöllenburg, M., Tokuyama, T.: Consistent digital rays. Discrete Comput. Geom.
**42**(3), 359–378 (2009)MathSciNetCrossRefzbMATHGoogle Scholar - 4.Corbett, P.: Rotator graphs: an efficient topology for point-to-point multiprocessor networks. IEEE Trans. Parallel Distrib. Syst.
**3**, 622–626 (1992)CrossRefGoogle Scholar - 5.Wm. Randolph Franklin: Problems with raster graphics algorithm. In: Peters, F.J., Kessener, L.R.A., van Lierop, M.L.P. (eds.) Data Structures for Raster Graphics, Steensel, Netherlands. Springer, Heidelberg (1985)Google Scholar
- 6.Goodrich, M.T., Guibas, L.J., Hershberger, J., Tanenbaum, P.J.: Snap rounding line segments efficiently in two and three dimensions. In: Symposium on Computational Geometry, pp. 284–293 (1997)Google Scholar
- 7.Greene, D.H., Yao, F.F.: Finite-resolution computational geometry. In: 27th Annual Symposium on Foundations of Computer Science, Toronto, Canada, 27–29 October, pp. 143–152. IEEE Computer Society (1986)Google Scholar
- 8.Luby, M.G.: Grid geometries which preserve properties of euclidean geometry: a study of graphics line drawing algorithms. In: Earnshaw, R.A. (ed.) Theoretical Foundations of Computer Graphics and CAD, vol. 40, pp. 397–432. Springer, Heidelberg (1988)CrossRefGoogle Scholar
- 9.Williams, A.: The greedy Gray code algorithm. In: Dehne, F., Solis-Oba, R., Sack, J.-R. (eds.) WADS 2013. LNCS, vol. 8037, pp. 525–536. Springer, Heidelberg (2013)CrossRefGoogle Scholar