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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)