Пример #1
0
    def generate():
        a = Vector(int(x1.get()), int(
            y1.get()))  # Vector A is sampled from left column of inputs
        b = Vector(int(x2.get()), int(
            y2.get()))  # Vector B is sampled from right column of inputs

        #print(a, b)

        c = Convex_Combination(a, b)

        C = c.randomVectorSample(4)
        try:
            plt.clf()

        except:
            pass

        for x in C:
            x.plot()

        a.plot(colour="b")
        b.plot(colour="b")

        plt.plot([a.x, b.x], [a.y, b.y], "b--")
        plt.title("Result")

        plt.show()