Skip to contents

For a 2D curve with (x,y) coordinates parameterized by the arc length, interpolate new (x,y) coordinates at new arc lengths. Smooth the input data with a smoothing spline.

Usage

interpolate_points_frame(arclen, x, y, arclen_out, spar = 0.1, fill_gaps = 0)

Arguments

arclen

Input arc length

x, y

Coordinates of points on the curve

arclen_out

New arc length

spar

Smoothing parameter (ranges from 0 for no smoothing to 1 for high smoothing; see smooth.spline() for more details.)

fill_gaps

Fill internal missing points of this size or smaller. (0, default, means no filling; 1 means to fill single missing points)

Value

A tibble containing the new interpolated and smoothed x and y coordinates as columns xs and ys