(points, size_u, size_v)
return new_points
Converts linear sequence of input points into a quad structure.

    :param points: list of points to be ordered
    :type points: list, tuple
    :param size_v: number of elements in a row
    :type size_v: int
    :param size_u: number of elements in a column
    :type size_u: int
    :return: re-ordered points
    :rtype: list
Converts linear sequence of input points into a quad structure.
Converts linear sequence of input points into a quad structure .
def make_quad(points, size_u, size_v):
    """ Converts linear sequence of input points into a quad structure.

    :param points: list of points to be ordered
    :type points: list, tuple
    :param size_v: number of elements in a row
    :type size_v: int
    :param size_u: number of elements in a column
    :type size_u: int
    :return: re-ordered points
    :rtype: list
    """
    # Start with generating a zig-zag shape in row direction and then take its reverse
    new_points = make_zigzag(points, size_v)
    new_points.reverse()

    # Start generating a zig-zag shape in col direction
    forward = True
    for row in range(0, size_v):
        temp = []
        for col in range(0, size_u):
            temp.append(points[row + (col * size_v)])
        if forward:
            forward = False
        else:
            forward = True
            temp.reverse()
        new_points += temp

    return new_points
def make_quad ( points , size_u , size_v ) : # Start with generating a zig-zag shape in row direction and then take its reverse new_points = make_zigzag ( points , size_v ) new_points . reverse ( ) # Start generating a zig-zag shape in col direction forward = True for row in range ( 0 , size_v ) : temp = [ ] for col in range ( 0 , size_u ) : temp . append ( points [ row + ( col * size_v ) ] ) if forward : forward = False else : forward = True temp . reverse ( ) new_points += temp return new_points