Exemple #1
0
def trivial_test():
    A = Pattern(Point.ManyPoints([1, 1, 2],[1, 2, 1]))
    B = Pattern(Point.ManyPoints([1, 1, 2], [4, 5, 4]))
    FrisStolp(Euclid2, A, B)
    FrisStolp(Euclid2, B, A)
    PrintPattern(A, "s")
    PrintPattern(B, "^")
    print(A)
    print(B)
    plt.show()
Exemple #2
0
def unif_test():
    B = Pattern(Point.ManyPoints(np.random.rand(25, 1), np.random.rand(25, 1)))
    x1 = list(5 + np.random.rand(25, 1))
    y1 = list(np.random.rand(25, 1))
    x2 = list(2 + np.random.rand(25, 1))
    y2 = list(2 + np.random.rand(25, 1))
    x3 = list(np.random.rand(25, 1))
    y3 = list(5 + np.random.rand(25, 1))

    temp = Point.ManyPoints(x1+x2+x3, y1+y2+y3)
    A = Pattern(temp)
    FrisStolp(Euclid2, A, B)
    FrisStolp(Euclid2, B, A)
    print(A)
    print(B)
    PrintPattern(A, "s")
    PrintPattern(B, "^")
    plt.show()
Exemple #3
0
def artificialClaster(centerX, centerY, scale, size):
    return Point.ManyPoints(np.random.normal(loc = centerX, scale = scale, size = size),\
       np.random.normal(loc = centerY, scale = scale, size = size))