code: def discretize_bspline(control,
                         knots,
                         count=None,
                         scale=1.0):
      
  
      # evaluate the b-spline using scipy/fitpack
      from scipy.interpolate import splev
      # (n, d) control points where d is the dimension of vertices
      control = np.asanyarray(control, dtype=np.float64)
      degree = len(knots) - len(control) - 1
      if count is None:
          norm = np.linalg.norm(np.diff(control, axis=0), axis=1).sum()
          count = int(np.clip(norm / (res.seg_frac * scale),
                              res.min_sections * len(control),
                              res.max_sections * len(control)))
  
      ipl = np.linspace(knots[0], knots[-1], count)
      discrete = splev(ipl, [knots, control.T, degree])
      discrete = np.column_stack(discrete)
  
      return discrete
docs: Given a B-Splines control points and knot vector, return
      a sampled version of the curve.
  
      Parameters
      ----------
      control : (o, d) float
        Control points of the b- spline
      knots : (j,) float
        B-spline knots
      count : int
        Number of line segments to discretize the spline
        If not specified will be calculated as something reasonable
  
      Returns
      ----------
      discrete : (count, dimension) float
         Points on a polyline version of the B-spline