code: public static double getAngleBetweenLinePlane( Coordinate a, Coordinate d, Coordinate b, Coordinate c ) {
  
          double[] rAD = {d.x - a.x, d.y - a.y, d.z - a.z};
          double[] rDB = {b.x - d.x, b.y - d.y, b.z - d.z};
          double[] rDC = {c.x - d.x, c.y - d.y, c.z - d.z};
  
          double[] n = {//
                  /*    */rDB[1] * rDC[2] - rDC[1] * rDB[2], //
                  -1 * (rDB[0] * rDC[2] - rDC[0] * rDB[2]), //
                  rDB[0] * rDC[1] - rDC[0] * rDB[1]//
          };
  
          double cosNum = n[0] * rAD[0] + n[1] * rAD[1] + n[2] * rAD[2];
          double cosDen = sqrt(n[0] * n[0] + n[1] * n[1] + n[2] * n[2]) * sqrt(rAD[0] * rAD[0] + rAD[1] * rAD[1] + rAD[2] * rAD[2]);
          double cos90MinAlpha = abs(cosNum / cosDen);
          double alpha = 90.0 - toDegrees(acos(cos90MinAlpha));
          return alpha;
      }
docs: Calculates the angle between line and plane.
  
  http://geogebrawiki.wikispaces.com/3D+Geometry
  
  @param a the 3d point.
  @param d the point of intersection between line and plane.
  @param b the second plane coordinate.
  @param c the third plane coordinate.
  @return the angle in degrees between line and plane.