Skip to main content
Computers and Graphics (Pergamon)Volume 114, August 2023, Pages 296-305

Crossing-free paths in the square grid(Article)(Open Access)

  Save all to author list
  • aDIBRIS, University of Genova, Genova, Italy
  • bFaculty of Technical Sciences, University of Novi Sad, Novi Sad, Serbia

Abstract

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. © 2023 Elsevier Ltd

Author keywords

Digital curvesDigital geometry and topologySelf-crossing pathsSkip listsSquare grid

Indexed keywords

Engineering uncontrolled termsDigital curveDigital geometryDigital topologyFree pathSelf-crossingSelf-crossing pathSkip listesSquare gridTime and space complexity

Funding details

Funding sponsor Funding number Acronym
451-03-47/2023-01/200156
  • 1

    This research (paper) has been supported by the Ministry of Science, Technological Development and Innovation through project no. 451-03-47/2023-01/200156 “Innovative scientific and artistic research from the FTS (activity) domain”.

  • ISSN: 00978493
  • CODEN: COGRD
  • Source Type: Journal
  • Original language: English
  • DOI: 10.1016/j.cag.2023.06.015
  • Document Type: Article
  • Publisher: Elsevier Ltd

  Magillo, P.; Faculty of Technical Sciences, University of Novi Sad, Novi Sad, Serbia;
© Copyright 2023 Elsevier B.V., All rights reserved.

Cited by 2 documents

Bonneau, G.-P. , Liu, L. , Mortara, M.
Foreword to the special section on Shape Modeling International 2023 (SMI2023)
(2023) Computers and Graphics (Pergamon)

Editorial Note Computers & Graphics Issue 114
(2023) Computers and Graphics (Pergamon)
View details of all 2 citations
{"topic":{"name":"Lattices; Set Partition; Generating Function","id":43200,"uri":"Topic/43200","prominencePercentile":35.215878,"prominencePercentileString":"35.216","overallScholarlyOutput":0},"dig":"5a8b1078f3e1cdcab94e4804a01c1bcdb8bf9d85374fee2c97255e52e4ff0848"}

SciVal Topic Prominence

Topic:
Prominence percentile: