advanced32 min studyLesson 924 in Mathematics

Planar subdivisions and point location

Measure the subdivision actually stored and distinguish face queries from boundary queries.

On this page

What you’ll understand

  • Represent a planar subdivision by incident vertices, edges, and faces.
  • Check a point’s face using consistent orientation tests and boundary handling.
  • State expected point-location bounds in the subdivision complexity.

A collection of drawn segments is not yet a planar subdivision: every crossing must become a vertex and split its incident edges. A subdivision records the resulting vertices, edge pieces, and faces, including the unbounded face. Let its complexity be the sum of those three counts. Point location asks which feature contains a query. For an interior query the answer is a face; a boundary query can instead return an edge or vertex with incidence information. This distinction avoids assigning a shared boundary arbitrarily to incompatible neighboring regions.

Store incidence as well as coordinates

A doubly connected edge list represents each undirected edge by two oppositely directed half-edges. Each half-edge records its twin, origin, next boundary edge, and incident face; suitable vertex and face records provide entry points. This supports local navigation around a face or vertex without repeatedly searching a geometric drawing. Holes and disconnected components need their own boundary-cycle records. The representation stores a planar embedding, not merely an abstract graph with no information about cyclic edge order.

For a finite connected plane graph, Euler's formula includes the unbounded face. More generally the right side depends on the number of connected components. These are useful consistency checks after splitting crossings or adding diagonals. They do not alone verify a correct embedding: overlapping edges, self-crossing face boundaries, or incorrect twin links can satisfy a numerical count. Incidence invariants and robust geometric predicates remain necessary. If original segments have many crossings, the stored subdivision can be quadratic in their initial count.

V−E+F=1+C,N=V+E+F.V-E+F=1+C,\qquad N=V+E+F.
For a finite plane embedding, C counts connected components and F includes the unbounded face; N measures stored subdivision complexity.↔ Scroll wide equations horizontally.

Replace a global search with local decisions

A vertical decomposition adds rays from vertices until they hit another edge or an enclosing box, producing constant-complexity trapezoid-like cells. A search hierarchy compares a query with vertical boundaries and supporting segments to locate its cell, then retrieves the original face label. The geometric decomposition and the hierarchy are different objects: many search paths may share a leaf for the same cell. A directed acyclic graph records that sharing and can remain much smaller than a naively duplicated search tree.

For noncrossing segment edges in a bounding box, with shared endpoints handled consistently and the usual generic sweep-direction assumptions, randomized incremental trapezoidal construction gives expected linear space and expected logarithmic search for each fixed interior query, with expected preprocessing at sorting scale. These expectations concern insertion order, independent of the fixed input and query, rather than a random query distribution. A worst-case bound simultaneously for all queries needs a stronger certified construction or another structure; it does not follow from the fixed-query expectation.

E[space]=O(N),E[Tbuild]=O(Nlog⁡N),E[Tquery(q)]=O(log⁡N).E[\text{space}]=O(N),\qquad E[T_{\mathrm{build}}]=O(N\log N),\qquad E[T_{\mathrm{query}}(q)]=O(\log N).
These are expected bounds for the basic randomized structure and a fixed admissible query, measured after subdivision construction.↔ Scroll wide equations horizontally.

Boundary answers require an exact convention

An orientation zero at an edge is a possible answer, not a failed comparison. For an edge-interior query, an API may return the edge and both incident faces; at a vertex, it may return the vertex and its incident features. A face-only API can choose a consistent half-open ownership convention instead, but must document it. Generic interior-query analysis often excludes vertical alignments with vertices; implementations handle these ties through explicit branches or symbolic comparisons rather than numerical nudges.

Keep preprocessing stages separate when reporting costs. Constructing an arrangement from intersecting input segments can dominate building a locator for the resulting subdivision. If the input is already a valid subdivision, that initial intersection work has already been done. A logarithmic query in the final complexity does not imply a subquadratic total representation for an arbitrary segment arrangement. Similarly, triangulating or vertically decomposing a region introduces auxiliary edges whose labels must preserve the original face identity.

Locate a query in a four-triangle subdivision

Take the rectangle with corners A=(0,0)A=(0,0), B=(6,0)B=(6,0), C=(6,4)C=(6,4), D=(0,4)D=(0,4) and center O=(3,2)O=(3,2). Join the center to all four corners. Count features and locate q=(4,1)q=(4,1), using counterclockwise triangle A,B,OA,B,O.

  1. There are five vertices, four rectangle edges and four spokes, so V=5V=5, E=8E=8. The four bounded triangles and exterior give F=5F=5, and V−E+F=2V-E+F=2 as required for one connected component.

  2. For triangle A,B,OA,B,O, the edge orientations against qq are orient⁡(A,B,q)=6\operatorname{orient}(A,B,q)=6, orient⁡(B,O,q)=1\operatorname{orient}(B,O,q)=1, and orient⁡(O,A,q)=5\operatorname{orient}(O,A,q)=5. All are positive.

  3. Thus qq lies strictly inside the lower triangle. The stored feature complexity is N=5+8+5=18N=5+8+5=18. A query at OO is a vertex query, while (4.5,1)(4.5,1) lies on spoke BOBO and needs the boundary convention.

The result

The face label and lower-dimensional feature answers are different legitimate outputs. The numerical Euler check supports, but does not replace, the incidence and orientation checks.

Explore the model

Interactive lab

Interactive lab · vectors

Distinguish an interior query from a boundary query

Pause/Reset and set BOTH controls to angle 4545 degrees, magnitude 11. The endpoint has coordinate sum 2>1\sqrt2>1, placing it above the partition line x+y=1x+y=1. For a fresh comparison Pause/Reset and set BOTH to angle 00 degrees, magnitude 11: the endpoint is (1,0)(1,0) exactly on that line. Changes retain the paused clock.

Distinguish an interior query from a boundary queryPlayback traces a fixed vector and its projections. Angle and magnitude set the geometry; the moving marker does not change them. Current readings: x component: 1.393; y component: 0.975; Magnitude: 1.7. All parameters are adjustable with the labeled controls below.−7.46−3.7303.737.46−3.5−1.7501.753.5xyvvₓ = 1.39
Vectorx / y projectionsTrace marker
x component
1.393
y component
0.975
Magnitude
1.7
t = 0 s

Playback traces a fixed vector and its projections. Angle and magnitude set the geometry; the moving marker does not change them. Parameter changes pause playback and recompute the model at the current elapsed time. Reset restores both parameters and returns time to zero. Playback starts paused. Adjust either parameter, then choose Play or Step.

Look forThe endpoint is a query point for a manually specified partition. The display does not construct a subdivision or a point-location hierarchy.

Check your understanding

A randomized locator has expected logarithmic search time for each fixed query. Which stronger statement follows automatically?

Try it yourself

Three segments have six distinct endpoints and three distinct proper pairwise crossings. Assume their union is connected and there are no further incidences. After splitting all crossings, find V, E, F and the subdivision complexity N.

Take a moment to make a prediction or work it out on paper. Open a hint when you need one.

Give me a hint

Each crossing adds one vertex and splits each of two original segments into one additional edge piece.

Compare with the solution

The vertex count is V=6+3=9V=6+3=9. Initially there are three edges; each proper crossing adds two edge pieces, so E=3+2⋅3=9E=3+2\cdot3=9. Connectedness and Euler give F=2−V+E=2F=2-V+E=2, including the exterior. Therefore N=9+9+2=20N=9+9+2=20. A point-location theorem measured in N applies to these pieces and features, rather than treating the original three unsplit segments as the entire stored input.

Take it with you

  • A subdivision requires split crossings and explicit incidence information.
  • Point-location complexity uses the final feature count, not just the original segment count.
  • Expected search for a fixed query and a simultaneous worst-case guarantee are different statements.

Read further

Original sources and deeper explanations to follow at your own pace.

Optional progress, saved in this browser when available. Revisit any lesson at any time.

Lesson not marked complete.