Median Cut clustering algorithm