Scan shows how brains plot future