def perform(self):
"""
This method performs the deformation of the mesh points. After the
execution it sets `self.modified_mesh_points`.
"""
n_points = self.original_mesh_points.shape[0]
dist = self._distance_matrix(
self.original_mesh_points, self.parameters.original_control_points
)
identity = np.ones((n_points, 1))
H = np.bmat([[dist, identity, self.original_mesh_points]])
self.modified_mesh_points = np.asarray(np.dot(H, self.weights))
评论列表
文章目录