implimented the quickhull algorithm