code: public static MatrixNd createOrthographic(int size, double right, double left, double top, double bottom,
                                               double near, double far) {
          if (size < 4) {
              throw new IllegalArgumentException("Minimum matrix size is 4");
          }
          final MatrixNd orthographic = new MatrixNd(size);
          orthographic.set(0, 0, 2 / (right - left));
          orthographic.set(1, 1, 2 / (top - bottom));
          orthographic.set(2, 2, -2 / (far - near));
          orthographic.set(0, 3, -(right + left) / (right - left));
          orthographic.set(1, 3, -(top + bottom) / (top - bottom));
          orthographic.set(2, 3, -(far + near) / (far - near));
          return orthographic;
      }
docs: Creates an orthographic viewing frustum built from the provided values
  
  @param size The size of the matrix, minimum of 4
  @param right the right most plane of the viewing frustum
  @param left the left most plane of the viewing frustum
  @param top the top plane of the viewing frustum
  @param bottom the bottom plane of the viewing frustum
  @param near the near plane of the viewing frustum
  @param far the far plane of the viewing frustum
  @return A viewing frustum built from the provided values