Draw a smooth curve (cardinal spline, or Catmull-Rom with tension option) through a point set with open or closed end, variable tension and number of segments. The implementation is highly optimized for performance still preserving quality.