pathResample: Resample a curve

View source: R/geom_pathResample.R

pathResampleR Documentation

Resample a curve

Description

Resamples a curve, defined by an ordered set of coordinates, by the desired number of points or desired distance between points.

Usage

pathResample(coords, value, method = "npts")

Arguments

coords

A NxK matrix-like object containing xy(z) point coordinates, one per row.

value

A numeric value to use for sampling given the requested method.

method

The sampling method to use. Valid options are: a) "npts" which requests the number of points specified in the value parameter and is the default; and b) "dist", which specifies the requested distance between the points. Note that distance is computed by summing segment lengths, so the distance between the sampled points in space will NOT be the same.

Value

A resampled curve as output by geomorph::digit.curves

TODO

Write tests. ALSO, check length of output!!

Note

This is a wrapper for geomorph::digit.curves, and parameters are passed directly to that function without any checking. Ergo that function is responsible for error handling.

Author(s)

Cornel M. Pop

Examples

print("Coming soon")

cornelmpop/Lithics3D documentation built on Feb. 10, 2024, 11:54 p.m.