English

Polygon Detection from a Set of Lines

Computational Geometry 2023-12-29 v1

Abstract

Detecting polygons defined by a set of line segments in a plane is an important step in analyzing vector drawings. This paper presents an approach combining several algorithms to detect basic polygons from arbitrary line segments. The resulting algorithm runs in polynomial time and space, with complexities of O((N+M)4)O\bigl((N + M)^4\bigr) and O((N+M)2)O\bigl((N + M)^2\bigr), where NN is the number of line segments and MM is the number of intersections between line segments. Our choice of algorithms was made to strike a good compromise between efficiency and ease of implementation. The result is a simple and efficient solution to detect polygons from lines.

Keywords

Cite

@article{arxiv.2312.16363,
  title  = {Polygon Detection from a Set of Lines},
  author = {Alfredo Ferreira and Manuel J. Fonseca and Joaquim A. Jorge},
  journal= {arXiv preprint arXiv:2312.16363},
  year   = {2023}
}

Comments

5 pages, 5 figures, 1 table

R2 v1 2026-06-28T14:02:38.612Z