kd-tree construction

x split y split

Binary tree

2D space