예제 #1
0
def test_beamcirc_intersecting_fully_from_bottom_inside_center():
    circ = Circle(Point([0, -0.5]), 3)
    beam = Probe(Point([-2, 0]), Point([2, 0]), 2)
    assert_allclose(beamcirc(beam, circ), 11.5955559562, rtol=1e-6)
예제 #2
0
def test_beamcirc_intersecting_fully():
    circ = Circle(Point([0, 0]), 1)
    beam = Probe(Point([-2, 0]), Point([2, 0]), 2)
    assert_allclose(beamcirc(beam, circ), 3.14159265359, rtol=1e-6)
예제 #3
0
def test_beamcirc_intersecting_partially_from_bottom_inside_center():
    circ = Circle(Point([0, -0.5]), 1)
    beam = Probe(Point([-2, 0]), Point([2, 0]), 2)
    assert_allclose(beamcirc(beam, circ), 2.52740780429, rtol=1e-6)
예제 #4
0
def test_beamcirc_intersecting_fully_from_bottom_outside_center():
    circ = Circle(Point([0, -1.5]), 3)
    beam = Probe(Point([-2, 0]), Point([2, 0]), 2)
    assert_allclose(beamcirc(beam, circ), 10.0257253792, rtol=1e-6)
예제 #5
0
def test_beamcirc_nonintersecting_bottom():
    circ = Circle(Point([0, -3]), 1)
    beam = Probe(Point([-2, 0]), Point([2, 0]), 2)
    assert_allclose(beamcirc(beam, circ), 0., rtol=1e-6)
예제 #6
0
def test_beamcirc_intersecting_partially_from_bottom_outside_center():
    circ = Circle(Point([0, -1.5]), 1)
    beam = Probe(Point([-2, 0]), Point([2, 0]), 2)
    assert_allclose(beamcirc(beam, circ), 0.614184849304, rtol=1e-6)
예제 #7
0
def test_beamcirc_nonintersecting_top():
    circ = Circle(Point([0, 3]), 1)
    beam = Beam(Point([-2, 0]), Point([2, 0]), 2)
    assert_allclose(beamcirc(beam, circ), 0., rtol=1e-6)
예제 #8
0
def test_beamcirc_vertical_intersection():
    circ = Circle(Point([0, 0]), 1)
    beam = Probe(Point([-1, -1]), Point([1, 1]), 1)
    assert_allclose(beamcirc(beam, circ), 1.91322295498, rtol=1e-6)
예제 #9
0
def test_beamcirc_intersecting_fully_from_bottom_inside_center():
    circ = Circle(Point([0, -0.5]), 3)
    beam = Probe(Point([-2, 0]), Point([2, 0]), 2)
    assert_allclose(beamcirc(beam, circ), 11.5955559562, rtol=1e-6)
예제 #10
0
def test_beamcirc_intersecting_fully():
    circ = Circle(Point([0, 0]), 1)
    beam = Probe(Point([-2, 0]), Point([2, 0]), 2)
    assert_allclose(beamcirc(beam, circ), 3.14159265359, rtol=1e-6)
예제 #11
0
def test_beamcirc_intersecting_fully_from_bottom_outside_center():
    circ = Circle(Point([0, -1.5]), 3)
    beam = Probe(Point([-2, 0]), Point([2, 0]), 2)
    assert_allclose(beamcirc(beam, circ), 10.0257253792, rtol=1e-6)
예제 #12
0
def test_beamcirc_intersecting_partially_from_bottom_inside_center():
    circ = Circle(Point([0, -0.5]), 1)
    beam = Probe(Point([-2, 0]), Point([2, 0]), 2)
    assert_allclose(beamcirc(beam, circ), 2.52740780429, rtol=1e-6)
예제 #13
0
def test_beamcirc_intersecting_partially_from_bottom_outside_center():
    circ = Circle(Point([0, -1.5]), 1)
    beam = Probe(Point([-2, 0]), Point([2, 0]), 2)
    assert_allclose(beamcirc(beam, circ), 0.614184849304, rtol=1e-6)
예제 #14
0
def test_beamcirc_nonintersecting_bottom():
    circ = Circle(Point([0, -3]), 1)
    beam = Probe(Point([-2, 0]), Point([2, 0]), 2)
    assert_allclose(beamcirc(beam, circ), 0., rtol=1e-6)
예제 #15
0
def test_beamcirc_vertical_intersection():
    circ = Circle(Point([0, 0]), 1)
    beam = Probe(Point([-1, -1]), Point([1, 1]), 1)
    assert_allclose(beamcirc(beam, circ), 1.91322295498, rtol=1e-6)