## Abstract

We develop data structures for intersection queries in four dimensions that involve segments, triangles and tetrahedra. Specifically, we study three main problems: (i) Preprocess a set of n tetrahedra in R^{4} into a data structure for answering segment-intersection queries amid the given tetrahedra (referred to as segment-tetrahedron intersection queries). (ii) Preprocess a set of n triangles in R^{4} into a data structure that supports triangle-intersection queries amid the input triangles (referred to as triangle-triangle intersection queries). (iii) Preprocess a set of n segments in R^{4} into a data structure that supports tetrahedron-intersection queries amid the input segments (referred to as tetrahedron-segment intersection queries). In each problem we want either to detect an intersection, or to count or report all intersections. As far as we can tell, these problems have not been previously studied. For problem (i), we first present a “standard” solution which, for any prespecified value n≤s≤n^{6} of a so-called storage parameter s, yields a data structure with O^{∗}(s) storage and expected preprocessing, which answers an intersection query in O^{∗}(n/s^{1/6}) time (here and in what follows, the O^{∗}(·) notation hides subpolynomial factors). For problems (ii) and (iii), using similar arguments, we present a solution that has the same asymptotic performance bounds. We then improve the solution for problem (i), and present a more intricate data structure that uses O^{∗}(n^{2}) storage and expected preprocessing, and answers a segment-tetrahedron intersection query in O^{∗}(n^{1/2}) time, improving the O^{∗}(n^{2/3}) query time obtained by the standard solution. Using the parametric search technique of Agarwal and Matoušek (SIAM J Comput 22:794–806, 1993), we can obtain data structures with similar performance bounds for the ray-shooting problem amid tetrahedra in R^{4}. Unfortunately, so far we do not know how to obtain a similar improvement for problems (ii) and (iii). Our algorithms are based on a primal-dual technique for range searching with semi-algebraic sets, based on recent advances in this area (Agarwal et al. in SIAM J Comput 50:760–787, 2021. Also in Proceedings of Symposium on Computational Geometry (SoCG) 5:1–5:14, 2019. Also in arXiv:1812.10269; Matoušek and Patáková in Discrete Comput Geom 54:22–41, 2015). As this is a result of independent interest, we spell out the details of this technique. We present several applications of our techniques, including continuous collision detection amid moving tetrahedra in 3-space, an output-sensitive algorithm for constructing the arrangement of n tetrahedra in R^{4}, and an output-sensitive algorithm for constructing the intersection or union of two or several nonconvex polyhedra in R^{4}.

Original language | English |
---|---|

Journal | Discrete and Computational Geometry |

DOIs | |

State | Accepted/In press - 2024 |

## Keywords

- 52C45
- 68Q25
- 68U05
- Computational geometry
- Intersection queries in R
- Polynomial partitioning
- Range searching
- Ray shooting
- Semi-algebraic sets
- Tetrahedra in R
- Tradeoff

## All Science Journal Classification (ASJC) codes

- Theoretical Computer Science
- Geometry and Topology
- Discrete Mathematics and Combinatorics
- Computational Theory and Mathematics