JavaScript port of qhull