code: public static int contacts(Point3d[] x, Point3d[] y, double maxDistance) {
  		int contacts = 0;
  		for (int i = 0; i < x.length; i++) {
  			double minDist = Double.MAX_VALUE;
  			for (int j = 0; j < y.length; j++) {
  				minDist = Math.min(minDist, x[i].distanceSquared(y[j]));
  			}
  			if (minDist < maxDistance * maxDistance) {
  				contacts++;
  			}
  		}
  		return contacts;
  	}
docs: /*
  Needs documentation!
  
  @param x
  
  @param y
  
  @param maxDistance
  
  @return