View source: R/TrajectoryGeometry.R
projectPathToSphere | R Documentation |
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.
projectPathToSphere(path, from = 1, to = nrow(path), d = ncol(path))
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) |
This returns a projection of the path onto the d-1 sphere in the form of a (to - from) x d matrix.
projection1 = projectPathToSphere(straight_path)
projection2 = projectPathToSphere(crooked_path,from=6)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.