Recursively decompose the underlying space into four equal area blocks as long as a block contains more than one line segment unless the line segments are all incident at the same vertex which is also in the same block. Each block is maximal and contains at most one vertex. For more details, see pages 480-483 of Samet, Foundations of Multidimensional and Metric Data Structures or, see pages 240-257 of Samet, Design and Analysis of Spatial Data Structures.
In Insert mode, click and drag to specify a new rectangle, in Delete mode click inside an existing rectangle to remove it from the quadtree. In Search mode click and drag to specify a rectangle. Rectangles in the quadtree that overlap the specified rectangle will be shown.