()
| 1200 | |
| 1201 | |
| 1202 | def test_proj_transform(): |
| 1203 | M = _test_proj_make_M() |
| 1204 | invM = np.linalg.inv(M) |
| 1205 | |
| 1206 | xs = np.array([0, 1, 1, 0, 0, 0, 1, 1, 0, 0]) * 300.0 |
| 1207 | ys = np.array([0, 0, 1, 1, 0, 0, 0, 1, 1, 0]) * 300.0 |
| 1208 | zs = np.array([0, 0, 0, 0, 0, 1, 1, 1, 1, 1]) * 300.0 |
| 1209 | |
| 1210 | txs, tys, tzs = proj3d.proj_transform(xs, ys, zs, M) |
| 1211 | ixs, iys, izs = proj3d.inv_transform(txs, tys, tzs, invM) |
| 1212 | |
| 1213 | np.testing.assert_almost_equal(ixs, xs) |
| 1214 | np.testing.assert_almost_equal(iys, ys) |
| 1215 | np.testing.assert_almost_equal(izs, zs) |
| 1216 | |
| 1217 | |
| 1218 | def _test_proj_draw_axes(M, s=1, *args, **kwargs): |
nothing calls this directly
no test coverage detected
searching dependent graphs…