code: def splitQuadratic(pt1, pt2, pt3, where, isHorizontal):
      """Split a quadratic Bezier curve at a given coordinate.
  
      Args:
          pt1,pt2,pt3: Control points of the Bezier as 2D tuples.
          where: Position at which to split the curve.
          isHorizontal: Direction of the ray splitting the curve. If true,
              ``where`` is interpreted as a Y coordinate; if false, then
              ``where`` is interpreted as an X coordinate.
  
      Returns:
          A list of two curve segments (each curve segment being three 2D tuples)
          if the curve was successfully split, or a list containing the original
          curve.
  
      Example::
  
          >>> printSegments(splitQuadratic((0, 0), (50, 100), (100, 0), 150, False))
          ((0, 0), (50, 100), (100, 0))
          >>> printSegments(splitQuadratic((0, 0), (50, 100), (100, 0), 50, False))
          ((0, 0), (25, 50), (50, 50))
          ((50, 50), (75, 50), (100, 0))
          >>> printSegments(splitQuadratic((0, 0), (50, 100), (100, 0), 25, False))
          ((0, 0), (12.5, 25), (25, 37.5))
          ((25, 37.5), (62.5, 75), (100, 0))
          >>> printSegments(splitQuadratic((0, 0), (50, 100), (100, 0), 25, True))
          ((0, 0), (7.32233, 14.6447), (14.6447, 25))
          ((14.6447, 25), (50, 75), (85.3553, 25))
          ((85.3553, 25), (92.6777, 14.6447), (100, -7.10543e-15))
          >>> # XXX I'm not at all sure if the following behavior is desirable:
          >>> printSegments(splitQuadratic((0, 0), (50, 100), (100, 0), 50, True))
          ((0, 0), (25, 50), (50, 50))
          ((50, 50), (50, 50), (50, 50))
          ((50, 50), (75, 50), (100, 0))
      """
      a, b, c = calcQuadraticParameters(pt1, pt2, pt3)
      solutions = solveQuadratic(
          a[isHorizontal], b[isHorizontal], c[isHorizontal] - where
      )
      solutions = sorted(t for t in solutions if 0 <= t < 1)
      if not solutions:
          return [(pt1, pt2, pt3)]
      return _splitQuadraticAtT(a, b, c, *solutions)
  
imports: from fontTools.misc.arrayTools import calcBounds, sectRect, rectArea
  from fontTools.misc.transform import Identity
  import math
  from collections import namedtuple
  from math import sqrt, acos, cos, pi
label_desc: Use image node_id 16 for calling a global function with example usage: splitQuadratic(pt1, pt2, pt3, where, isHorizontal) and returns: _splitQuadraticAtT, list