code: def derivative(self, T, n=1):
          
          seg_idx, t = self.T2t(T)
          seg = self._segments[seg_idx]
          return seg.derivative(t, n=n)/seg.length()**n
docs: returns the tangent vector of the Path at T (centered at the origin
          and expressed as a complex number).
          Note: Bezier curves can have points where their derivative vanishes.
          If you are interested in the tangent direction, use unit_tangent()
          method instead.