Code more about space partition

more codes on space partition