Esempio n. 1
0
def test_ray_parallel_to_stem():
    ray = Ray(Point(-1, 0, 1), Vector(0, 1, 1))
    assert [] == intersect(ray)
Esempio n. 2
0
def test_ray_misses_to_wing2():
    ray = Ray(Point(1, 0, 0), Vector(0, 1, -1))
    assert [] == intersect(ray)
Esempio n. 3
0
def test_ray_intersects_wing2():
    ray = Ray(Point(-1, 0, -1), Vector(0, 0, 1))
    assert [1] == intersect(ray)
Esempio n. 4
0
def test_ray_parallel_to_wing1():
    ray = Ray(Point(1, 1, 0), Vector(0, 1, -1))
    assert [] == intersect(ray)
Esempio n. 5
0
def test_ray_misses_stem():
    ray = Ray(Point(-1, 1, 0), Vector(1, 0, 0))
    assert [] == intersect(ray)
Esempio n. 6
0
def test_ray_intersects_stem():
    ray = Ray(Point(0, 0, -1), Vector(1, 0, 0))
    assert [0] == intersect(ray)