public static Matrix4d createLookAt(Vector3d eye, Vector3d at, Vector3d up) {
        final Vector3d f = at.sub(eye).normalize();
        final Vector3d s = f.cross(up).normalize();
        final Vector3d u = s.cross(f);
        final Matrix4d mat = new Matrix4d(
                s.getX(), s.getY(), s.getZ(), 0,
                u.getX(), u.getY(), u.getZ(), 0,
                -f.getX(), -f.getY(), -f.getZ(), 0,
                0, 0, 0, 1);
        return mat.translate(eye.negate());
    }
public static Matrix4d createLookAt(Vector3d eye, Vector3d at, Vector3d up) {
        final Vector3d f = at.sub(eye).normalize();
        final Vector3d s = f.cross(up).normalize();
        final Vector3d u = s.cross(f);
        final Matrix4d mat = new Matrix4d(
                s.getX(), s.getY(), s.getZ(), 0,
                u.getX(), u.getY(), u.getZ(), 0,
                -f.getX(), -f.getY(), -f.getZ(), 0,
                0, 0, 0, 1);
        return mat.translate(eye.negate());
    }
public static Matrix4d createLookAt ( Vector3d eye , Vector3d at , Vector3d up ) { final Vector3d f = at . sub ( eye ) . normalize ( ) ; final Vector3d s = f . cross ( up ) . normalize ( ) ; final Vector3d u = s . cross ( f ) ; final Matrix4d mat = new Matrix4d ( s . getX ( ) , s . getY ( ) , s . getZ ( ) , 0 , u . getX ( ) , u . getY ( ) , u . getZ ( ) , 0 , - f . getX ( ) , - f . getY ( ) , - f . getZ ( ) , 0 , 0 , 0 , 0 , 1 ) ; return mat . translate ( eye . negate ( ) ) ; }
Creates a "look at" matrix for the given eye point.

@param eye The position of the camera
@param at The point that the camera is looking at
@param up The "up" vector
@return A rotational transform that corresponds to a camera looking at the given point
Creates a look at matrix for the given eye point .