code: protected int selectSplitOffset( int indexStart , int length ) {
  		int bestOffset = -1;
  
  		int indexEnd = (indexStart + length) % N;
  		Point2D_I32 startPt = contour.get(indexStart);
  		Point2D_I32 endPt = contour.get(indexEnd);
  
  		line.p.set(startPt.x,startPt.y);
  		line.slope.set(endPt.x-startPt.x,endPt.y-startPt.y);
  
  		double bestDistanceSq = splitThresholdSq(contour.get(indexStart), contour.get(indexEnd));
  
  		// adjusting using 'minimumSideLengthPixel' to ensure it doesn't create a new line which is too short
  		int minLength = Math.max(1,minimumSideLengthPixel);// 1 is the minimum so that you don't split on the same corner
  		length -= minLength;
  		for( int i = minLength; i <= length; i++ ) {
  			Point2D_I32 b = contour.get((indexStart+i)%N);
  			point2D.set(b.x,b.y);
  
  			double dist = Distance2D_F64.distanceSq(line, point2D);
  			if( dist >= bestDistanceSq ) {
  				bestDistanceSq = dist;
  				bestOffset = i;
  			}
  		}
  
  		return bestOffset;
  	}
docs: Finds the point between indexStart and the end point which is the greater distance from the line
  (set up prior to calling).  Returns the index of the element with a distances greater than tolerance, otherwise -1
  
  @return Selected offset from start of the split. -1 if no split was selected