Core Graphics in iOS have many capabilities in creating, manipulating and rendering paths. Many developers want to create a path that passes “smoothly” through some given points using bezier curves. This requires that you calculate the control points of the bezier curve yourself, because Core graphics doesn’t have a function to do that.
This is why I have created these functions. They can receive a CGPath (consisting only of straight lines) and produce a smoothed version that consists of bezier curves. The computation of the control points is done automatically and depends on the given “tension” variable. I’d like to mention that these functions can be used in other APIs besides CoreGraphics.
I have added these functions in my “outline calculation” functions. I have updated the demo to make use of both of them separately and in chain (calculate a smoothed version of the outline of a path). Take a look of the demo below!
If you want to use these functions, take a look at my repo at github where the demo and the functions with their documentation reside.
PS. If you want to see these functions in action in a full fledged app, download Soundbeam app