• Home
  • Search
  • Extending Segment Tree for Polygon Clipping and Parallelizing using OpenMP and OpenACC Directives
  • Cite Icon4
  • https://doi.org/10.1145/3673038.3673141Copy DOI Icon

Extending Segment Tree for Polygon Clipping and Parallelizing using OpenMP and OpenACC Directives

  • Aug 12, 2024
  • Buddhi Ashan Mallika Kankanamalage +2 more
Show More
  • Abstract
  • PDF
  • Literature Map
  • References
  • Citations
  • Similar Papers
Abstract

A segment tree is a versatile tree-based data structure over intervals or line segments efficiently supporting several computational operations such as stabbing query, segment arrangement, and planar point location, both theoretically and practically. Polygon clipping is a basic operation in domains such as Computer Graphics, Computer-aided Design, and Geographic Information Science (GIS). Given two polygons with n vertices, polygon clipping algorithms find the geometric intersection or union in <Formula format="inline"><TexMath><?TeX $\mathcal {O}(n^2)$?></TexMath><AltText>Math 1</AltText><File name="icpp24-103-inline1" type="svg"/></Formula> time using Foster’s all-to-all edge intersection testing and <Formula format="inline"><TexMath><?TeX $\mathcal {O}((n+k)\log n)$?></TexMath><AltText>Math 2</AltText><File name="icpp24-103-inline2" type="svg"/></Formula> time using Vatti’s sweep line-based method, where k is the number of intersections. No known segment tree implementation, including the CGAL library, supports intersection finding or polygon clipping. We extended the segment tree leveraging Chaselle’s PRAM-model augmentation, parallelized the construction of our augmented segment tree, and employed it to find line segment intersections for polygon clipping while handling degenerate cases. Augmented segment tree eliminates 99% of non-intersecting edge pairs compared to 63% by the state-of-the-art filtering based on common minimum bounding rectangle method employed in Foster’s GPU-based implementation. This, coupled with Ω(nlog n) work on a single CPU core, beats Foster’s GPU performance with <Formula format="inline"><TexMath><?TeX $\mathcal {O}(n^2)$?></TexMath><AltText>Math 3</AltText><File name="icpp24-103-inline3" type="svg"/></Formula> work. Our OpenMP directive based multi-core implementation achieves up to 4X relative speedup for clipping two polygons with 182K vertices and 5X speedup for five polygons with 398K vertices. We also offloaded the parallel kernels to a GPU using OpenACC achieving performance competitive with Foster’s GPU implementation. Our profiling indicates limitations of the compiler directives and potential for superior performance by employing pthread/cuda libraries.

Loading PDF

Similar Papers
  • Research Article

Approximability of covering cells with line segments

  • May 20, 2019
  • Theoretical Computer Science
  • Paz Carmi +3
  • Research Article
  • Citations17

GPU Accelerated Dissipative Particle Dynamics with Parallel Cell-list Updating

  • Jan 01, 2011
  • IEIT Journal of Adaptive and Dynamic Computing;
  • Hao Wu
  • Research Article

Planar Point Location Using Persistent Search Treesa

  • May 01, 1989
  • Annals of the New York Academy of Sciences
  • Neil Sarnak +1
  • Book Chapter
  • Citations2

Profile-Based Feature Representation Based on Guide Curve Approximation Using Line and Arc Segments

  • Jan 01, 2012
  • Jinggao Li +1
  • PDF
  • Research Article

On Intersections of B-Spline Curves

  • Apr 28, 2024
  • Mathematics
  • Ying-Ying Yu +2
  • Conference Article
  • Citations27

Generation of architectural CAD models using a mobile robot

  • May 08, 1994
  • X Lebegue +1
  • Research Article

Turkey

  • Aug 01, 1996
  • ACM SIGGRAPH Computer Graphics
  • Bülent Özgüç
  • Book Chapter
  • Citations388

Chapter 13 Qualitative Spatial Representation and Reasoning

  • Dec 07, 2007
  • Foundations of Artificial Intelligence
  • Anthony G Cohn +1
  • Research Article
  • Citations3

A new algorithm for two-dimensional line clipping via geometric transformation

  • Sep 01, 1998
  • Journal of Computer Science and Technology
  • Haohong Wang +2
  • Research Article
  • Citations263

Plane-sweep algorithms for intersecting geometric figures

  • Oct 01, 1982
  • Communications of the ACM
  • J Nievergelt +1
  • Research Article
  • Citations1

3-coloring arrangements of line segments with 4 slopes is hard

  • May 17, 2018
  • Information Processing Letters
  • Patrizio Angelini +1
  • Conference Article
  • Citations4

Parallel Strategy of FMBEM for 3D Elastostatics and its GPU Implementation Using CUDA

  • Aug 17, 2014
  • Zhaohui Xia +4
  • Research Article
  • Citations20

Computer-Aided Geometric Design: A bibliography with Keywords and Classified Index

  • Jul 01, 1981
  • IEEE Computer Graphics and Applications
  • Barsky
  • Conference Article
  • Citations1

Optical Algorithms in Geometry

  • Jan 01, 1993
  • Y B Karasik +1
  • Book Chapter
  • Citations4

The Accuracy of the Digital Representation of a Straight Line

  • Jan 01, 1985
  • Leo Dorst
Cactus Communications logo

Copyright 2026 Cactus Communications. All rights reserved.