code: public static double[] getPlaneCoefficientsFrom3Points( Coordinate c1, Coordinate c2, Coordinate c3 ) {
          double a = (c2.y - c1.y) * (c3.z - c1.z) - (c3.y - c1.y) * (c2.z - c1.z);
          double b = (c2.z - c1.z) * (c3.x - c1.x) - (c3.z - c1.z) * (c2.x - c1.x);
          double c = (c2.x - c1.x) * (c3.y - c1.y) - (c3.x - c1.x) * (c2.y - c1.y);
          double d = -1.0 * (a * c1.x + b * c1.y + c * c1.z);
          return new double[]{a, b, c, d};
      }
docs: Calculates the coeffs of the plane equation: ax+by+cz+d=0 given 3 coordinates.
  
  @param c1 coordinate 1.
  @param c2 coordinate 2.
  @param c3 coordinate 3.
  @return the array of the coeffs [a, b, c, d]