docstr: Tests that model_to_screen generates expected results.
docstr_tok: ["Tests","that","model_to_screen","generates","expected","results","."]
code: def test_model_to_screen_preset(self):
      """Tests that model_to_screen generates expected results."""
      point_world_space = np.array(((3.1, 4.1, 5.1), (-1.1, 2.2, -3.1)))
      camera_position = np.array(((0.0, 0.0, 0.0), (0.4, -0.8, 0.1)))
      camera_up = np.array(((0.0, 1.0, 0.0), (0.0, 0.0, 1.0)))
      look_at_point = np.array(((0.0, 0.0, 1.0), (0.0, 1.0, 0.0)))
      vertical_field_of_view = np.array(
          ((60.0 * math.pi / 180.0,), (65 * math.pi / 180,))
      )
      lower_left_corner = np.array(((0.0, 0.0), (10.0, 20.0)))
      screen_dimensions = np.array(((501.0, 501.0), (400.0, 600.0)))
      near = np.array(((0.01,), (1.0,)))
      far = np.array(((4.0,), (3.0,)))
  
      # Build matrices.
      model_to_eye_matrix = look_at.right_handed(
          camera_position, look_at_point, camera_up
      )
      perspective_matrix = perspective.right_handed(
          vertical_field_of_view,
          screen_dimensions[..., 0:1] / screen_dimensions[..., 1:2],
          near,
          far,
      )
  
      pred_screen, pred_w = glm.model_to_screen(
          point_world_space,
          model_to_eye_matrix,
          perspective_matrix,
          screen_dimensions,
          lower_left_corner,
      )
  
      gt_screen = (
          (-13.23016357, 599.30444336, 4.00215721),
          (98.07017517, -95.40383911, 3.1234405),
      )
      gt_w = ((5.1,), (3.42247,))
      self.assertAllClose(pred_screen, gt_screen, atol=1e-5, rtol=1e-5)
      self.assertAllClose(pred_w, gt_w)
  
imports: import math
  from absl.testing import flagsaver
  from absl.testing import parameterized
  import numpy
  import tensorflow
  from tensorflow_graphics.geometry.transformation import look_at
  from tensorflow_graphics.rendering.camera import perspective
  from tensorflow_graphics.rendering.opengl import math
  from tensorflow_graphics.util import test_case
label_desc: Use image node_id 24 for calling the MathTest obj's underlying member method code with example usage: obj.test_model_to_screen_preset() without return types