13 angle = np.linalg.norm(ROTATION)
16 skew = np.array([[0, z, -y], [-z, 0, x], [y, -x, 0]])
17 rotation = (np.eye(3) + np.sin(angle) / angle * skew
18 + (1 - np.cos(angle)) / angle**2 * skew @ skew)
19 return rotation @ np.diag(np.exp(LOG_STRETCH))
23 points = np.column_stack((x, y, z))
29 jacobian = np.linalg.det(gradient)
30 inverse_transpose = np.linalg.inv(gradient).T
31 stress = (2 * C10 * jacobian**(-2 / 3)
32 * (gradient - np.sum(gradient**2) / 3 * inverse_transpose)
33 + K * jacobian * (jacobian - 1) * inverse_transpose)
34 normals = np.column_stack((tx, ty, tz))
35 normals /= np.linalg.norm(normals, axis=1)[:,
None]
36 return np.ascontiguousarray(normals @ stress.T)