# bezierSpline

Takes a line and returns a curved version by applying a Bezier spline algorithm.
获取一条直线应用 贝塞尔算法 返回一个贝塞尔曲线。

参数

参数 类型 描述
line Feature <LineString> input LineString
options Object Optional parameters: see below

options选项

属性 类型 默认值 描述
resolution number 10000 time in milliseconds between points
sharpness number 0.85 a measure of how curvy the path should be between splines

返回

Feature <LineString> - curved line

示例

var line = turf.lineString([
  [-76.091308, 18.427501],
  [-76.695556, 18.729501],
  [-76.552734, 19.40443],
  [-74.61914, 19.134789],
  [-73.652343, 20.07657],
  [-73.157958, 20.210656]
]);

var curved = turf.bezierSpline(line);
Last Updated: 1/19/2021, 10:59:20 AM