Description Usage Arguments Details Value Author(s) See Also Examples
A function to translate, rotate and scale the points of trajectory2 using trajectory1. The new trajectory will have the same start and end points as trajectory1.
1 | StartEndTranslate(traj1, traj2)
|
traj1 |
An m x n matrix containing trajectory1. Here m is the number of points and n is the dimension of the points. |
traj2 |
A k x n matrix containing trajectory2. Here k is the number of points and n is the dimension of the points. The two trajectories are not required to have the same number of points. |
Every point of trajectory2 is rotated, scaled and translated so that the start and end points of the two trajectories match. The new variation of trajectory2 is returned as a matrix.
An m x n matrix containing the new variation of trajectory2 is returned. Here m is the number of points and n is the dimension of the points.
Kevin Toohey
1 2 3 4 5 6 | # Creating two trajectories.
path1 <- matrix(c(0, 1, 2, 3, 0, 1, 2, 3), 4)
path2 <- matrix(c(0, 1, 2, 3, 4, 5, 6, 7), 4)
# Running the translation.
StartEndTranslate(path1, path2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.