Skip to contents

get_curvilinear_length() is a function that computes the total arc-length of a streamline object as the sum of Euclidean segment lengths between consecutive points.

Usage

get_curvilinear_length(x)

Arguments

x

A streamline object.

Value

A non-negative numeric scalar.

Examples

pts <- matrix(runif(30), ncol = 3)
colnames(pts) <- c("X", "Y", "Z")
sl <- streamline(points = pts)
get_curvilinear_length(sl)
#> [1] 5.41975