Пример #1
0
 def initialize_rotation_in_y(self):
     self.transformation_context = "rotation in y"
     angle = math.pi / 6.0
     cosine_of_angle = math.cos(angle)
     sine_of_angle = math.sin(angle)
     self.start_position_coordinates = (1.0, 100.0, 200.0, 300.0)
     self.stop_position_coordinates = (
         1.0,
         100.0 * cosine_of_angle + 300.0 * sine_of_angle,
         200,
         300.0 * cosine_of_angle - 100.0 * sine_of_angle,
     )
     x = math.sqrt(0.4)
     y = math.sqrt(0.5)
     z = math.sqrt(0.1)
     self.start_direction_coordinates = (0.0, x, y, z)
     self.stop_direction_coordinates = (
         0.0,
         x * cosine_of_angle + z * sine_of_angle,
         y,
         z * cosine_of_angle - x * sine_of_angle,
     )
     self.transformation_under_test = Transformation.rotation_about_y_axis(angle)