예제 #1
0
def ShowPointsWithPolygon(points, polygon):
    """Função Criada para exibir os pontos

    Parameters:
        points (Array): Lista de Pontos

    """
    canvas = Canvas(title="Exibição dos Pontos",
                    width=(min_x[0] + max_x[0]),
                    height=(min_y[1] + max_y[1]),
                    inverted=False)

    for p in points:
        canvas.DrawPoint(p, fill='black')

    firstPoint = None
    lastPoint = None
    for p in polygon:
        canvas.DrawPoint(p)

        if (lastPoint == None):
            firstPoint = p
        else:
            canvas.DrawLine(lastPoint, p)

        lastPoint = p

    canvas.DrawLine(lastPoint, firstPoint)

    canvas.Show()
예제 #2
0
def ShowPointsAtMerge(left, right, merge):
    """Função Criada para exibir os pontos durante o Merge

    Parameters:
        left (Array): Lista de Pontos pertecente ao fecho esquerdo
        right (Array): Lista de Pontos pertecente ao fecho direito
        merge (Array): Lista de Pontos pertecente ao fecho combinado

    """
    canvas = Canvas(title="Exibição dos Merge",
                    width=(min_x[0] + max_x[0]),
                    height=(min_y[1] + max_y[1]),
                    inverted=False)

    for p in left:
        canvas.DrawPoint(p, fill='blue')

    for p in right:
        canvas.DrawPoint(p, fill='green')

    firstPoint = None
    lastPoint = None
    for p in merge:
        canvas.DrawPoint(p)

        if (lastPoint == None):
            firstPoint = p
        else:
            canvas.DrawLine(lastPoint, p)

        lastPoint = p

    canvas.DrawLine(lastPoint, firstPoint)

    canvas.Show()
예제 #3
0
def ShowPoints(points):
    """Função Criada para exibir os pontos

    Parameters:
        points (Array): Lista de Pontos

    """
    canvas = Canvas(title="Exibição dos Pontos",
                    width=(min_x[0] + max_x[0]),
                    height=(min_y[1] + max_y[1]),
                    inverted=False)

    for p in points:
        canvas.DrawPoint(p, fill='black')

    canvas.Show()