pathProgression: Measure a path's progression

View source: R/TrajectoryGeometry.R

pathProgressionR Documentation

Measure a path's progression

Description

This function measures the progress of a path in a specified direction. This direction will typically be the center of its projection onto the sphere as revealed using your favorite statistic.

Usage

pathProgression(path, from = 1, to = nrow(path), d = ncol(path), direction)

Arguments

path

- An n x d matrix

from

- The point along the path to be taken as the starting point. This defaults to 1.

to

- The point along the path to be used as the end point. This defaults to nrow(path).

d

- The dimension to be used. This defaults to ncol(path).

direction

- A non-zero numeric whose length is the the dimension.

Value

This returns a numeric given the signed distance projection of the path along the line through its starting point in the given direction.

Examples

progress =
    pathProgression(straight_path,direction=straight_path_center)
progress =
    pathProgression(crooked_path,from=6,direction=crooked_path_center)

AnnaLaddach/TrajectoryGeometry documentation built on Feb. 23, 2024, 2:24 p.m.