protected void averageNormalsTangents(
            Vector3f topPoint,
            Vector3f rootPoint,
            Vector3f leftPoint,
            Vector3f bottomPoint,
            Vector3f rightPoint,
            Vector3f normal,
            Vector3f tangent,
            Vector3f binormal)
    {
        Vector3f scale = getWorldScale();

        Vector3f n1 = new Vector3f(0,0,0);
        if (topPoint != null && leftPoint != null) {
            n1.set(calculateNormal(topPoint.mult(scale), rootPoint.mult(scale), leftPoint.mult(scale)));
        }
        Vector3f n2 = new Vector3f(0,0,0);
        if (leftPoint != null && bottomPoint != null) {
            n2.set(calculateNormal(leftPoint.mult(scale), rootPoint.mult(scale), bottomPoint.mult(scale)));
        }
        Vector3f n3 = new Vector3f(0,0,0);
        if (rightPoint != null && bottomPoint != null) {
            n3.set(calculateNormal(bottomPoint.mult(scale), rootPoint.mult(scale), rightPoint.mult(scale)));
        }
        Vector3f n4 = new Vector3f(0,0,0);
        if (rightPoint != null && topPoint != null) {
            n4.set(calculateNormal(rightPoint.mult(scale), rootPoint.mult(scale), topPoint.mult(scale)));
        }

        //if (bottomPoint != null && rightPoint != null && rootTex != null && rightTex != null && bottomTex != null)
        //    LODGeomap.calculateTangent(new Vector3f[]{rootPoint.mult(scale),rightPoint.mult(scale),bottomPoint.mult(scale)}, new Vector2f[]{rootTex,rightTex,bottomTex}, tangent, binormal);

        normal.set(n1.add(n2).add(n3).add(n4).normalize());

        tangent.set(normal.cross(new Vector3f(0,0,1)).normalize());
        binormal.set(new Vector3f(1,0,0).cross(normal).normalize());
    }
Matches the normals along the edge of the patch with the neighbours.
Computes the normals for the right, bottom, left, and top edges of the
patch, and saves those normals in the neighbour's edges too.

Takes 4 points (if it has a neighbour on that side) for each
point on the edge of the patch:
             *
             |
         *---x---*
             |
             *
It works across the right side of the patch, from the top down to
the bottom. Then it works on the bottom side of the patch, from the
left to the right.
jme3-terrain/src/main/java/com/jme3/terrain/geomipmap/TerrainPatch.java