Crossing-free paths in the square grid

被引:2
|
作者
Comic, Lidija [1 ]
Magillo, Paola [2 ]
机构
[1] Univ Genoa, DIBRIS, Genoa, Italy
[2] Univ Novi Sad, Fac Tech Sci, Novi Sad, Serbia
来源
COMPUTERS & GRAPHICS-UK | 2023年 / 114卷
关键词
Digital geometry and topology; Digital curves; Square grid; Self-crossing paths; Skip lists;
D O I
10.1016/j.cag.2023.06.015
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
We consider paths in the 2D square grid, composed of grid edges, given as a sequence of moves in the four cardinal compass directions, without U-turns, but possibly passing several times through the same vertex or the same edge (if the path is open, it cannot pass twice through its starting vertex). We propose an algorithm which reports a self-crossing if there is one, or otherwise draws the path without self-crossings. The algorithm follows the intuitive idea naturally applied by humans to draw a curve: at each vertex that has already been visited, it tries to insert two new segments in such a way that they do not cross the existing ones. If this is not possible, a self-crossing is reported. This procedure is supported by a data structure combining a doubly-linked circular list and a skip list. The time and space complexity is linear in the length of the path. & COPY; 2023 Elsevier Ltd. All rights reserved.
引用
收藏
页码:296 / 305
页数:10
相关论文
共 50 条
  • [1] On the number of crossing-free partitions
    Razen, Andreas
    Welzl, Emo
    COMPUTATIONAL GEOMETRY-THEORY AND APPLICATIONS, 2013, 46 (07): : 879 - 893
  • [2] THE COMPLEXITY OF DETECTING CROSSING-FREE CONFIGURATIONS IN THE PLANE
    JANSEN, K
    WOEGINGER, GJ
    BIT, 1993, 33 (04): : 580 - 595
  • [3] On the number of crossing-free matchings, cycles, and partitions
    Sharir, Micha
    Welzl, Emo
    SIAM JOURNAL ON COMPUTING, 2006, 36 (03) : 695 - 720
  • [4] On the Number of Crossing-Free Matchings, (Cycles, and Partitions)
    Sharir, Micha
    Welzl, Emo
    PROCEEDINGS OF THE SEVENTHEENTH ANNUAL ACM-SIAM SYMPOSIUM ON DISCRETE ALGORITHMS, 2006, : 860 - +
  • [5] Crossing-free segments and triangles in point configurations
    Károlyi, G
    Welzl, E
    DISCRETE APPLIED MATHEMATICS, 2001, 115 (1-3) : 77 - 88
  • [6] Lower bounds on the number of crossing-free subgraphs of KN
    García, A
    Noy, M
    Tejel, J
    COMPUTATIONAL GEOMETRY-THEORY AND APPLICATIONS, 2000, 16 (04): : 211 - 221
  • [7] Counting triangulations and other crossing-free structures approximately
    Alvarez, Victor
    Bringmann, Karl
    Ray, Saurabh
    Seidel, Raimund
    COMPUTATIONAL GEOMETRY-THEORY AND APPLICATIONS, 2015, 48 (05): : 386 - 397
  • [8] Reporting the crossing-free segments of a complete geometric graph
    Furukata, M
    Asano, K
    INTERNATIONAL JOURNAL OF COMPUTER MATHEMATICS, 1996, 62 (3-4) : 163 - 170
  • [9] Reporting the crossing-free segments of a complete geometric graph
    Furukata, Masahiko
    Asano, Kouhei
    1996, Gordon & Breach Science Publ Inc, Newark, NJ, United States (62) : 3 - 4