English

Convex Polygon Containment: Improving Quadratic to Near Linear Time

Computational Geometry 2024-03-21 v1

Abstract

We revisit a standard polygon containment problem: given a convex kk-gon PP and a convex nn-gon QQ in the plane, find a placement of PP inside QQ under translation and rotation (if it exists), or more generally, find the largest copy of PP inside QQ under translation, rotation, and scaling. Previous algorithms by Chazelle (1983), Sharir and Toledo (1994), and Agarwal, Amenta, and Sharir (1998) all required Ω(n2)\Omega(n^2) time, even in the simplest k=3k=3 case. We present a significantly faster new algorithm for k=3k=3 achieving O(nO(npolylog n)n) running time. Moreover, we extend the result for general kk, achieving O(kO(1/ε)n1+ε)O(k^{O(1/\varepsilon)}n^{1+\varepsilon}) running time for any ε>0\varepsilon>0. Along the way, we also prove a new O(kO(1)nO(k^{O(1)}npolylog n)n) bound on the number of similar copies of PP inside QQ that have 4 vertices of PP in contact with the boundary of QQ (assuming general position input), disproving a conjecture by Agarwal, Amenta, and Sharir (1998).

Keywords

Cite

@article{arxiv.2403.13292,
  title  = {Convex Polygon Containment: Improving Quadratic to Near Linear Time},
  author = {Timothy M. Chan and Isaac M. Hair},
  journal= {arXiv preprint arXiv:2403.13292},
  year   = {2024}
}

Comments

To appear in SoCG 2024

R2 v1 2026-06-28T15:26:49.428Z