Create new line segments by clicking and dragging in the drawing area on the left.
You can also make random line segments by using the Generate button.
Click on Start Building button on to finalize the segments and start building interval
tree.
Building Mode
In building mode, the median (dashed line) and segments stored on each tree node
is displayed in the drawing area with the same color with the node.
You can choose whether the lines are sorted by their left or right endpoints.
Hover mouse on the nodes of the tree to see the corresponding median and segments in drawing area.
Use Recurse button to recurse down the tree to either the left or right child node
(depending on recursion status).
Use Undo Recurse button to undo it.
Use Finish Subtree button to finish the subtree on the current node and return to its
parent.
Click on Start Query button to proceed to the query mode.
Query Mode
In query mode, only the segments intersecting the querying position are colored gradually as you run the algorithm.
Drag the black vertical line on the drawing area to select a query position.
The Recurse and Undo Recurse buttons have the same functionality;
but the Finish Subtree button is not available since querying algorithm does not branch.