calculate view