polliwog/polyline/polyline.py
def bisect_edges(self, edges):
        """
        Cutting the given edges in half.

        Return an arrray that gives the new indices of the original vertices.
        """
        new_vs = self.v
        indices_of_original_vertices = np.arange(len(self.v))
        for offset, edge_to_subdivide in enumerate(edges):
            new_v = np.mean(self.segments[edge_to_subdivide], axis=0).reshape(-1, 3)
            old_v2_index = self.e[edge_to_subdivide][0] + 1
            insert_at = offset + old_v2_index
            new_vs = np.insert(new_vs, insert_at, new_v, axis=0)
            indices_of_original_vertices[old_v2_index:] = (
                indices_of_original_vertices[old_v2_index:] + 1
            )
        self.v = new_vs
        return indices_of_original_vertices

        Cutting the given edges in half.

        Return an arrray that gives the new indices of the original vertices.
        
Cutting the given edges in half.
Return an arrray that gives the new indices of the original vertices.
Cutting the given edges in half . Return an arrray that gives the new indices of the original vertices .
def bisect_edges(self, edges):
        new_vs = self.v
        indices_of_original_vertices = np.arange(len(self.v))
        for offset, edge_to_subdivide in enumerate(edges):
            new_v = np.mean(self.segments[edge_to_subdivide], axis=0).reshape(-1, 3)
            old_v2_index = self.e[edge_to_subdivide][0] + 1
            insert_at = offset + old_v2_index
            new_vs = np.insert(new_vs, insert_at, new_v, axis=0)
            indices_of_original_vertices[old_v2_index:] = (
                indices_of_original_vertices[old_v2_index:] + 1
            )
        self.v = new_vs
        return indices_of_original_vertices
def bisect_edges ( self , edges ) : new_vs = self . v indices_of_original_vertices = np . arange ( len ( self . v ) ) for offset , edge_to_subdivide in enumerate ( edges ) : new_v = np . mean ( self . segments [ edge_to_subdivide ] , axis = 0 ) . reshape ( - 1 , 3 ) old_v2_index = self . e [ edge_to_subdivide ] [ 0 ] + 1 insert_at = offset + old_v2_index new_vs = np . insert ( new_vs , insert_at , new_v , axis = 0 ) indices_of_original_vertices [ old_v2_index : ] = ( indices_of_original_vertices [ old_v2_index : ] + 1 ) self . v = new_vs return indices_of_original_vertices
Cutting the given edges in half.
Cutting the given edges in half .
"""
        Cutting the given edges in half.

        Return an arrray that gives the new indices of the original vertices.
        """
self
edges