# Convex layers

The convex layers of a point set and their intersection with a halfplane

In computational geometry, the convex layers of a set of points in the Euclidean plane are a sequence of nested convex polygons having the points as their vertices. The outermost one is the convex hull of the points and the rest are formed in the same way recursively. The innermost layer may be degenerate, consisting only of one or two points.[1] The problem of constructing convex layers has also been called onion peeling or onion decomposition.[2]

Although constructing the convex layers by repeatedly finding convex hulls would be slower, it is possible to partition any set of ${\displaystyle n}$ points into its convex layers in time ${\displaystyle O(n\log n)}$.[1]

An early application of the convex layers was in robust statistics, as a way of identifying outliers and measuring the central tendency of a set of sample points.[3][4] In this context, the number of convex layers surrounding a given point is called its convex hull peeling depth, and the convex layers themselves are the depth contours for this notion of data depth.[5]

Convex layers may be used as part of an efficient range reporting data structure for listing all of the points in a query half-plane. The points in the half-plane from each successive layer may be found by a binary search to find the most extreme point in the direction of the half-plane, and then searching sequentially from there. Fractional cascading can be used to speed up the binary searches, giving total query time ${\displaystyle O(\log n+k)}$ to find ${\displaystyle k}$ points out of a set of ${\displaystyle n}$.[6]

The points of an ${\displaystyle n\times n}$ grid have ${\displaystyle \Theta (n^{4/3})}$ convex layers,[7] as do the same number of uniformly random points within any convex shape.[8]

## References

1. ^ a b Chazelle, Bernard (1985), "On the convex layers of a planar set", IEEE Trans. Inf. Theory, 31 (4): 509–517, doi:10.1109/TIT.1985.1057060, MR 0798557
2. ^ Löffler, Maarten; Mulzer, Wolfgang (2014), "Unions of onions: preprocessing imprecise points for fast onion decomposition", Journal of Computational Geometry, 5 (1): 1–13, arXiv:, doi:10.20382/jocg.v5i1a1, MR 3162956.
3. ^ Barnett, V. (1976), "The ordering of multivariate data", J. Roy. Statist. Soc. Ser. A, 139 (3): 318–355, doi:10.2307/2344839, MR 0445726
4. ^ Eddy, W. F. (1982), "Convex Hull Peeling", COMPSTAT 1982 5th Symposium held at Toulouse 1982, Physica-Verlag, pp. 42–47, doi:10.1007/978-3-642-51461-6_4
5. ^ Liu, Regina Y.; Parelius, Jesse M.; Singh, Kesar (1999), "Multivariate analysis by data depth: descriptive statistics, graphics and inference", Annals of Statistics, 27 (3): 783–858, doi:10.1214/aos/1018031260, MR 1724033
6. ^ Chazelle, Bernard; Guibas, Leo J.; Lee, D. T. (1985), "The power of geometric duality", BIT, 25 (1): 76–90, doi:10.1007/BF01934990, MR 0785806
7. ^ Har-Peled, Sariel; Lidický, Bernard (2013), "Peeling the grid", SIAM Journal on Discrete Mathematics, 27 (2): 650–655, doi:10.1137/120892660, MR 3040367
8. ^ Dalal, Ketan (2004), "Counting the onion", Random Structures & Algorithms, 24 (2): 155–165, doi:10.1002/rsa.10114, MR 2035873