コード例 #1
0
 def test_squared_errors(self):
     vs1 = sample2D(self.patch, self.grid, 1.0)
     vs2 = sample2D(self.patch, self.grid, 1.0)
     self.assertEqual(squared_error_verts(vs1, vs2), 0.0)
     vs2[0] = Vertex((0.05555557459592819,-0.05555557459592819,0.5))
     self.assertNotEqual(squared_error_verts(vs1, vs2), 0.0)
コード例 #2
0
 def test_squared_errors(self):
     vs1 = sample2D(self.patch, self.grid, 1.0)
     vs2 = sample2D(self.patch, self.grid, 1.0)
     self.assertEqual(squared_error_verts(vs1, vs2), 0.0)
     vs2[0] = Vertex((0.05555557459592819, -0.05555557459592819, 0.5))
     self.assertNotEqual(squared_error_verts(vs1, vs2), 0.0)
コード例 #3
0
 def test_sampling(self):
     sampled_vs = sample2D(self.patch, self.grid, 1.0)
     corners = get_limiting_verts(self.grid, 40)
     sampled_vsi = [self.grid.verts.index(v) for v in sampled_vs]
     self.assertEqual(set(corners), set(sampled_vsi))
コード例 #4
0
 def test_sampling(self):
     sampled_vs = sample2D(self.patch, self.grid, 1.0)
     corners = get_limiting_verts(self.grid, 40)
     sampled_vsi = [self.grid.verts.index(v) for v in sampled_vs]
     self.assertEqual(set(corners), set(sampled_vsi))