Skip to contents

Resamples a single streamline onto a uniform arc-length grid. See reparametrize() for the full parameter documentation.

Value

A streamline reparametrized onto the new grid. The returned object has @points resampled to exactly n_points rows via linear interpolation, and any numeric @point_data entries likewise resampled. Non-numeric @point_data entries are dropped with a warning. @streamline_data is preserved unchanged.

See also

Examples

sl <- streamline(
  points = cbind(X = runif(10), Y = runif(10), Z = runif(10)),
  point_data = list(FA = runif(10))
)
sl_reparam <- reparametrize(sl, n_points = 20)
sl_reparam@n_points  # 20
#> [1] 20