Beispiel #1
0
def start():
    """
    Summary line.
    
    Parameters
    ----------
    arg1 : int
        Description of arg1

    Returns
    -------
    int
        Description of return value
    """

    coordinates = data.read_coordinates()

    for key, value in coordinates.items():

        if (calc.check_intersection() and calc.check_orientation()):
            print(key, value)
            print("Δ")
            # import numpy as np
            # import pyplot as plt
            # linalg.det(a)

            # Make a quick sin plot
            #x = np.linspace(, 10, 100)
            #y = np.sin(x)
            #plt.plot(x, y)
            #plt.xlabel("Time")
            #plt.ylabel("Amplitude")

            # Save it in png and svg formats
            plot.save("signal", ext="png", close=False, verbose=True)
            plot.save("signal", ext="svg", close=True, verbose=True)
def test_intersecting_lines_outside_range():
    matrix = [[[0, 10], [1, 9.9]], [[0, 0.01], [1, 0.02]]]
    assert not calc.check_intersection(matrix, None)
def test_intersecting_lines():
    matrix = [[[2, 1], [3, 2]], [[1, 0], [2, 0]]]
    assert calc.check_intersection(matrix, None)
def test_identical_lines():
    matrix = [[[1, 1], [3, 3]], [[0, 0], [2, 2]]]
    assert not calc.check_intersection(matrix, None)
def test_parallel_lines():
    matrix = [[[1, 1], [2, 2]], [[1, 0], [2, 1]]]
    assert not calc.check_intersection(matrix, None)
def test_calculate():
    assert calc.check_intersection()