code: def path_to_vertexlist(path, group=None, colors=None, **kwargs):
      
      # avoid cache check inside tight loop
      vertices = path.vertices
  
      # get (n, 2, (2|3)) lines
      lines = np.vstack([util.stack_lines(e.discrete(vertices))
                         for e in path.entities])
      count = len(lines)
  
      # stack zeros for 2D lines
      if util.is_shape(vertices, (-1, 2)):
          lines = lines.reshape((-1, 2))
          lines = np.column_stack((lines, np.zeros(len(lines))))
  
      # index for GL is one per point
      index = np.arange(count).tolist()
  
      args = (count,    # number of lines
              GL_LINES,  # mode
              group,    # group
              index,    # indices
              ('v3f/static', lines.reshape(-1)),
              colors_to_gl(colors, count=count))  # default colors
      return args
docs: Convert a Path3D object to arguments for an
      indexed vertex list constructor.
  
      Parameters
      -------------
      path : trimesh.path.Path3D object
        Mesh to be rendered
      group : str
        Rendering group for the vertex list
  
      Returns
      --------------
      args : (7,) tuple
        Args for vertex list constructor