def get_unique_triangles(triangles):
    """Yield unique triangles.

    >>> list(get_unique_triangles([(0, 1, 2), (1, 1, 0), (2, 1, 0), (1, 0, 0)]))
    [(0, 1, 2), (0, 2, 1)]
    >>> list(get_unique_triangles([(0, 1, 2), (1, 1, 0), (2, 0, 1)]))
    [(0, 1, 2)]
    """
    _added_triangles = set()
    for v0, v1, v2 in triangles:
        if v0 == v1 or v1 == v2 or v2 == v0:
            continue
        if v0 < v1 and v0 < v2:
            verts = v0, v1, v2
        elif v1 < v0 and v1 < v2:
            verts = v1, v2, v0
        elif v2 < v0 and v2 < v1:
            verts = v2, v0, v1
        if verts not in _added_triangles:
            yield verts
            _added_triangles.add(verts)
