bezierSpline

fun bezierSpline(line: LineString, duration: Int, sharpness: Double = 0.85): LineString

Takes a LineString and returns a curved version by applying a Bezier spline algorithm.

The bezier spline implementation is a port of the implementation by Leszek Rybicki used in turfjs.

Return

A LineString containing a curved line around the positions of the input line

Parameters

line

the input LineString

duration

time in milliseconds between points in the output data

sharpness

a measure of how curvy the path should be between splines


fun bezierSpline(coords: List<Position>, duration: Int, sharpness: Double = 0.85): List<Position>

Takes a list of Position and returns a curved version by applying a Bezier spline algorithm.

The bezier spline implementation is a port of the implementation by Leszek Rybicki used in turfjs.

Return

A List containing Position of a curved line around the positions of the input line

Parameters

coords

the input list of Position.

duration

time in milliseconds between points in the output data

sharpness

a measure of how curvy the path should be between splines