Smooths the bezier curves that pass through this segment by taking into account the segment’s position and distance to the neighboring segments and changing the direction and length of the segment’s handles accordingly without moving the segment itself.
Two different smoothing methods are available:

'catmullrom'
uses the CatmullRom spline to smooth the segment.
The optionally passed factor controls the knot parametrization of the algorithm:
0.0
: the standard, uniform CatmullRom spline
0.5
: the centripetal CatmullRom spline, guaranteeing no selfintersections
1.0
: the chordal CatmullRom spline

'geometric'
use a simple heuristic and empiric geometric method to smooth the segment’s handles. The handles were weighted, meaning that big differences in distances between the segments will lead to probably undesired results.
The optionally passed factor defines the tension parameter (0…1
), controlling the amount of smoothing as a factor by which to scale each handle.
Options:
 options.type: String — the type of smoothing method: ‘catmullrom’, ‘geometric’ — default: ‘catmullrom’
 options.factor: Number — the factor parameterizing the smoothing method — default:
0.5
for 'catmullrom'
, 0.4
for 'geometric'
Parameters:

options:
Object
— the smoothing options
— optional