More accurate centerpoint algorithm