def to_interval(points: list):
    """ Transforms the set of points into set of intervals - Orthogonal hull

    Args:
        points (list of tuples): which are the points

    Example:
             POINT               INTERVALS
            A       B            X       Y
        [(0, 2), (1, 3)] --> [[0, 1], [2, 3]]

    Example 2:
            A       B       C            X       Y
        [(0, 2), (1, 5), (4, 3)] --> [[0, 4], [2, 5]]

    Example 3:
            A            B          C             X       Y     Z
        [(0, 2, 9), (1, 5, 0), (4, 3, 6)] --> [[0, 4], [2, 5], [0, 9]]
    """
    intervals = []
    for dimension in range(len(points[0])):
        interval = [points[0][dimension], points[0][dimension]]
        for point in range(len(points)):
            if interval[0] > points[point][dimension]:
                interval[0] = points[point][dimension]
            if interval[1] < points[point][dimension]:
                interval[1] = points[point][dimension]
        intervals.append(interval)
    return intervals