code: def bsinPoints(pb, pe):
      
      v = pe - pb
      assert v.y == 0, "begin and end points must have same y coordinate"
      f = abs(v) * 0.5 / math.pi              # represents the unit
      cp1 = 5.34295228e-01
      cp2 = 1.01474288e+00
      y_ampl = (0, f)
      y_cp1 = (0, f * cp1)
      y_cp2 = (0, f * cp2)
  
      p0 = pb
      p4 = pe
      p1 = pb + v * 0.25 - y_ampl
      p2 = pb + v * 0.5
      p3 = pb + v * 0.75 + y_ampl
      k1 = pb + v * (1./12.)  - y_cp1
      k2 = pb + v * (2./12.)  - y_cp2
      k3 = pb + v * (4./12.)  - y_cp2
      k4 = pb + v * (5./12.)  - y_cp1
      k5 = pb + v * (7./12.)  + y_cp1
      k6 = pb + v * (8./12.)  + y_cp2
      k7 = pb + v * (10./12.) + y_cp2
      k8 = pb + v * (11./12.) + y_cp1
      return p0, k1, k2, p1, k3, k4, p2, k5, k6, p3, k7, k8, p4
docs: Return Bezier control points, when pb and pe stand for a full period
      from (0,0) to (2*pi, 0), respectively, in the user's coordinate system.
      The returned points can be used to draw up to four Bezier curves for
      the complete phase of the sine function graph (0 to 360 degrees).