def test_shearing_x_z(): t = shearing(0, 1, 0, 0, 0, 0) p = Point(2, 3, 4) assert t * p == Point(6, 3, 4)
def test_shearing_x_y(): t = shearing(1, 0, 0, 0, 0, 0) p = Point(2, 3, 4) assert t * p == Point(5, 3, 4)
def test_shearing_z_x(): t = shearing(0, 0, 0, 0, 1, 0) p = Point(2, 3, 4) assert t * p == Point(2, 3, 6)
def test_shearing_z_y(): t = shearing(0, 0, 0, 0, 0, 1) p = Point(2, 3, 4) assert t * p == Point(2, 3, 7)
def assign_shearing(context, var, x_y, x_z, y_x, y_z, z_x, z_y): context.variables[var] = shearing(x_y, x_z, y_x, y_z, z_x, z_y)