Implemented shape splitting.