code: private void findStartingPoint() {
      // Well, we already know the best Y value...
      final double bestY = minmaxY.getMin();
      double bestX = Double.POSITIVE_INFINITY;
      int bestI = -1;
      Iterator<double[]> iter = this.points.iterator();
      for(int i = 0; iter.hasNext(); i++) {
        double[] vec = iter.next();
        if(vec[1] == bestY && vec[0] < bestX) {
          bestX = vec[0];
          bestI = i;
        }
      }
      assert (bestI >= 0);
      // Bring the reference object to the head.
      if(bestI > 0) {
        points.add(0, points.remove(bestI));
      }
    }
docs: Find the starting point, and sort it to the beginning of the list. The
  starting point must be on the outer hull. Any "most extreme" point will do,
  e.g. the one with the lowest Y coordinate and for ties with the lowest X.