docstr: Tests the Jacobian of perspective_correct_interpolation.
docstr_tok: ["Tests","the","Jacobian","of","perspective_correct_interpolation","."]
code: def test_perspective_correct_interpolation_jacobian_preset(self):
      """Tests the Jacobian of perspective_correct_interpolation."""
      vertices_init = np.tile(
          (
              (-0.2857143, 0.2857143, 5.0),
              (0.2857143, 0.2857143, 0.5),
              (0.0, -0.2857143, 1.0),
          ),
          (2, 1, 1),
      )
      attributes_init = np.tile(
          (((1.0, 0.0, 0.0), (0.0, 1.0, 0.0), (0.0, 0.0, 1.0))),
          (2, 1, 1),
      )
      pixel_position_init = np.array(((125.5, 375.5), (250.5, 250.5)))
      camera_position_init = np.tile((0.0, 0.0, 0.0), (2, 3, 1))
      look_at_init = np.tile((0.0, 0.0, 1.0), (2, 3, 1))
      up_vector_init = np.tile((0.0, 1.0, 0.0), (2, 3, 1))
      vertical_field_of_view_init = np.tile(
          (1.0471975511965976,), (2, 3, 1)
      )
      screen_dimensions_init = np.tile((501.0, 501.0), (2, 3, 1))
      near_init = np.tile((0.01,), (2, 3, 1))
      far_init = np.tile((10.0,), (2, 3, 1))
      lower_left_corner_init = np.tile((0.0, 0.0), (2, 3, 1))
  
      # Build matrices.
      model_to_eye_matrix_init = look_at.right_handed(
          camera_position_init, look_at_init, up_vector_init
      )
      perspective_matrix_init = perspective.right_handed(
          vertical_field_of_view_init,
          screen_dimensions_init[..., 0:1]
          / screen_dimensions_init[..., 1:2],
          near_init,
          far_init,
      )
  
      self.assert_jacobian_is_correct_fn(
          glm.perspective_correct_interpolation,
          [
              vertices_init,
              attributes_init,
              pixel_position_init,
              model_to_eye_matrix_init,
              perspective_matrix_init,
              screen_dimensions_init,
              lower_left_corner_init,
          ],
      )
  
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 30 for calling the MathTest obj's underlying member method code with example usage: obj.test_perspective_correct_interpolation_jacobian_preset() without return types