projectPathToSphere {TrajectoryGeometry} | R Documentation

## Project a path onto the unit sphere

### Description

This function takes a path in d dimensional space and projects it onto the d-1 sphere. It takes as additional arguments the starting and ending points under consideration and the dimension to be considered.

### Usage

    projectPathToSphere(path, from = 1, to = nrow(path), d = ncol(path))

### Arguments

`path` | - This is an mxn dimensional matrix. Each row is considered a point.
`from` | - The starting place along the path which will be treated as the center of the sphere. This defaults to 1.
`to` | - The end point of the path. This defaults to nrow(path).
`d` | - The dimension under consideration. This defaults to ncol(path)

### Value

This returns a projection of the path onto the d-1 sphere in the form of a (to - from) x d matrix.

### Examples

    projection1 = projectPathToSphere(straight_path)
    projection2 = projectPathToSphere(crooked_path,from=6)

[Package TrajectoryGeometry version 1.0.0 Index]