Skip to content
Snippets Groups Projects
Commit 2920116b authored by Paul McCarthy's avatar Paul McCarthy :mountain_bicyclist:
Browse files

TEST: Add test case with shear component

parent fcd3b65d
No related branches found
No related tags found
No related merge requests found
...@@ -226,8 +226,9 @@ def test_compose_and_decompose(): ...@@ -226,8 +226,9 @@ def test_compose_and_decompose():
xform = lines[i * 4: i * 4 + 4] xform = lines[i * 4: i * 4 + 4]
xform = np.genfromtxt(xform) xform = np.genfromtxt(xform)
scales, offsets, rotations = affine.decompose(xform) scales, offsets, rotations, shears = affine.decompose(
result = affine.compose(scales, offsets, rotations) xform, shears=True)
result = affine.compose(scales, offsets, rotations, shears=shears)
assert np.all(np.isclose(xform, result, atol=1e-5)) assert np.all(np.isclose(xform, result, atol=1e-5))
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
1.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0
0.0 1.0 0.0 0.0 0.0 1.0 0.0 0.0
0.0 0.0 -1.0 0.0 0.0 0.0 -1.0 0.0
0.0 0.0 0.0 1.0 0.0 0.0 0.0 1.0
0.5 0.0 0.0 0.0 0.5 0.0 0.0 0.0
0.0 2.4 0.0 0.0 0.0 2.4 0.0 0.0
...@@ -35,22 +35,22 @@ ...@@ -35,22 +35,22 @@
0.0 0.0 1.6 53.0 0.0 0.0 1.6 53.0
0.0 0.0 0.0 1.0 0.0 0.0 0.0 1.0
0.5 0.0 0.0 10.0 0.5 0.0 0.0 10.0
0.0 0.0 -1.6 -6.7877502441 0.0 0.0 -1.6 -6.7877502441
0.0 2.4 0.0 29.7931518555 0.0 2.4 0.0 29.7931518555
0.0 0.0 0.0 1.0 0.0 0.0 0.0 1.0
0.0 -2.4 -0.0 30.6160888672 0.0 -2.4 -0.0 30.6160888672
0.0 0.0 -1.6 -6.7877502441 0.0 0.0 -1.6 -6.7877502441
0.5 0.0 0.0 50.5961608887 0.5 0.0 0.0 50.5961608887
0.0 0.0 0.0 1.0 0.0 0.0 0.0 1.0
-0.0 1.3765834472 1.3106432709 0.0736983719 -0.0 1.3765834472 1.3106432709 0.0736983719
0.0 -1.9659649063 0.9177222982 14.1062102814 0.0 -1.9659649063 0.9177222982 14.1062102814
0.5 0.0 0.0 50.5961608887 0.5 0.0 0.0 50.5961608887
0.0 0.0 0.0 1.0 0.0 0.0 0.0 1.0
0.453766452 -0.7004337463 0.4832135801 16.789591468 0.453766452 -0.7004337463 0.4832135801 16.789591468
-0.0159784155 1.6056689296 1.1880787388 -16.2943532298 -0.0159784155 1.6056689296 1.1880787388 -16.2943532298
-0.2093817023 -1.640493784 0.9565424959 66.1123321137 -0.2093817023 -1.640493784 0.9565424959 66.1123321137
0.0 0.0 0.0 1.0 0.0 0.0 0.0 1.0
...@@ -109,3 +109,8 @@ ...@@ -109,3 +109,8 @@
0.041017 -0.081580 -6.319922 72.090378 0.041017 -0.081580 -6.319922 72.090378
-0.000000 0.381914 -1.365036 -41.159451 -0.000000 0.381914 -1.365036 -41.159451
0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 1.000000
1.1441229 0.833406 3.765340 3
0.8312539 2.459607 -0.804545 4
1.4142136 1.554275 1.724796 5
0.0 0.0 0.0 1
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment