Exemple #1
0
    def test_angle_under_rotation(self):
        f1, f2 = Fol.rand(), Fol.rand()
        D = DefGrad.from_axis(Lin(45, 45), 60)

        assert np.allclose(f1.angle(f2),
                           f1.transform(D).angle(f2.transform(D)))
Exemple #2
0
    def test_transform_method(self, x, y, z):
        F = DefGrad.from_axis(z, 90)
        current = x.transform(F)
        expects = y

        assert current == expects
Exemple #3
0
    def test_angle_under_rotation(self):
        l1, l2 = Lin.rand(), Lin.rand()
        D = DefGrad.from_axis(Lin(45, 45), 60)

        assert np.allclose(l1.angle(l2),
                           l1.transform(D).angle(l2.transform(D)))
Exemple #4
0
    def test_mutual_rotation(self, x, y, z):
        current = x.H(y)
        expects = DefGrad.from_axis(z, 90)

        assert current == expects
Exemple #5
0
def test_orthogonality_rotation_matrix():
    lin = Lin.rand()
    a = np.random.randint(180)
    R = DefGrad.from_axis(lin, a)
    assert np.allclose(R * R.T, np.eye(3))
Exemple #6
0
def test_orthogonality_rotation_matrix():
    lin = Lin.rand()
    a = np.random.randint(180)
    R = DefGrad.from_axis(lin, a)
    assert np.allclose(R * R.T, np.eye(3))
Exemple #7
0
    def test_angle_under_rotation(self):
        f1, f2 = Fol.rand(), Fol.rand()
        D = DefGrad.from_axis(Lin(45, 45), 60)

        assert np.allclose(f1.angle(f2), f1.transform(D).angle(f2.transform(D)))
Exemple #8
0
    def test_angle_under_rotation(self):
        l1, l2 = Lin.rand(), Lin.rand()
        D = DefGrad.from_axis(Lin(45, 45), 60)

        assert np.allclose(l1.angle(l2), l1.transform(D).angle(l2.transform(D)))