sphere test bez
Major refactoring for adaptive