示例#1
0
 def test_distances_rotations(self):
     for axis, angle in axis_angle_sequence():
         s = random_direction()
         R = rotation_from_axis_angle(axis, angle)
         s2 = np.dot(R, s)
         dist = geodesic_distance_on_sphere(s, s2)
         # Note: this is == only if axis is orthogonal to s
         assert dist <= angle
示例#2
0
 def test_distances_rotations(self):
     for axis, angle in axis_angle_sequence():
         s = random_direction()
         R = rotation_from_axis_angle(axis, angle)
         s2 = np.dot(R, s)
         dist = geodesic_distance_on_sphere(s, s2)
         # Note: this is == only if axis is orthogonal to s
         assert dist <= angle
def any_distant_direction_test():
    for s in directions_sequence():
        z = any_distant_direction(s)
        d = geodesic_distance_on_sphere(z, s)
        assert d > np.pi / 6
示例#4
0
def any_distant_direction_test():
    for s in directions_sequence():
        z = any_distant_direction(s)
        d = geodesic_distance_on_sphere(z, s)
        assert d > np.pi / 6