Ejemplo n.º 1
0
 def test_scaled_points(self):
     points = np.array([[1, 0, 0], [0, 1, 0], [0, 0, 1]])
     center = np.array([0, 0, 0])
     radius = 1
     scaled = points * 2
     projected = spherical_voronoi.project_to_sphere(scaled, center, radius)
     assert_array_almost_equal(points, projected)
Ejemplo n.º 2
0
 def test_scaled_points(self):
     points = np.array([[1, 0, 0], [0, 1, 0], [0, 0, 1]])
     center = np.array([0, 0, 0])
     radius = 1
     scaled = points * 2
     projected = spherical_voronoi.project_to_sphere(scaled, center, radius)
     assert_array_almost_equal(points, projected)
Ejemplo n.º 3
0
 def test_translated_sphere(self):
     points = np.array([[1, 0, 0], [0, 1, 0], [0, 0, 1]])
     center = np.array([1, 2, 3])
     translated = points + center
     radius = 1
     projected = spherical_voronoi.project_to_sphere(
         translated, center, radius)
     assert_array_almost_equal(translated, projected)
Ejemplo n.º 4
0
 def test_translated_sphere(self):
     points = np.array([[1, 0, 0], [0, 1, 0], [0, 0, 1]])
     center = np.array([1, 2, 3])
     translated = points + center
     radius = 1
     projected = spherical_voronoi.project_to_sphere(translated, center,
                                                     radius)
     assert_array_almost_equal(translated, projected)