def triangle_iteration(start, dim, stop=None):
    """
    >>> list(triangle_iteration(1, 1, stop=3))
    [(1,), (2,), (3,)]
    >>> list(triangle_iteration(1, 2, stop=3))
    [(1, 1), (1, 2), (2, 1), (1, 3), (3, 1), (2, 2)]
    >>> list(triangle_iteration(1, 0, stop=3))
    []
    """
    if not dim:
        return

    # Initialization
    point = (start, ) * dim
    frontier = set([point])
    yield point

    c = 1

    while True:
        frontier = set(
            increase_coord(p, i)
            for p in list(frontier)
            for i, _ in enumerate(p)
        )

        for p in frontier:
            yield p

        c += 1
        if stop is not None and c >= stop:
            return