code: def quadratic_recursive(points, x1, y1, x2, y2, x3, y3, level=0):
      if level > curve_recursion_limit:
          return
  
      # Calculate all the mid-points of the line segments
      # -------------------------------------------------
      x12 = (x1 + x2) / 2.0
      y12 = (y1 + y2) / 2.0
      x23 = (x2 + x3) / 2.0
      y23 = (y2 + y3) / 2.0
      x123 = (x12 + x23) / 2.0
      y123 = (y12 + y23) / 2.0
  
      dx = x3 - x1
      dy = y3 - y1
      d = math.fabs((x2 - x3) * dy - (y2 - y3) * dx)
  
      if d > curve_collinearity_epsilon:
          # Regular case
          # ------------
          if d * d <= m_distance_tolerance_square * (dx * dx + dy * dy):
              # If the curvature doesn't exceed the distance_tolerance value
              # we tend to finish subdivisions.
              if m_angle_tolerance < curve_angle_tolerance_epsilon:
                  points.append((x123, y123))
                  return
  
              # Angle & Cusp Condition
              da = math.fabs(
                  math.atan2(y3 - y2, x3 - x2)
                  - math.atan2(y2 - y1, x2 - x1)
              )
              if da >= math.pi:
                  da = 2 * math.pi - da
  
              if da < m_angle_tolerance:
                  # Finally we can stop the recursion
                  points.append((x123, y123))
                  return
      else:
          # Collinear case
          # --------------
          da = dx * dx + dy * dy
          if da == 0:
              d = calc_sq_distance(x1, y1, x2, y2)
          else:
              d = ((x2 - x1) * dx + (y2 - y1) * dy) / da
              if d > 0 and d < 1:
                  # Simple collinear case, 1---2---3, we can leave just two
                  # endpoints
                  return
              if d <= 0:
                  d = calc_sq_distance(x2, y2, x1, y1)
              elif d >= 1:
                  d = calc_sq_distance(x2, y2, x3, y3)
              else:
                  d = calc_sq_distance(x2, y2, x1 + d * dx, y1 + d * dy)
  
          if d < m_distance_tolerance_square:
              points.append((x2, y2))
              return
  
      # Continue subdivision
      # --------------------
      quadratic_recursive(
          points, x1, y1, x12, y12, x123, y123, level + 1
      )
      quadratic_recursive(
          points, x123, y123, x23, y23, x3, y3, level + 1
      )
  
file_path: vispy/vispy/util/svg/geometry.py
imports: import math
label_desc: Use image node_id 2 for calling a global function with example usage: quadratic_recursive(points, x1, y1, x2, y2, x3, y3, level) without return types