Description Usage Arguments References Examples
View source: R/plotMotionSingleFrame.R
Plot a single 3D frame of the xyz
data obtained with getMotionData()
.
The plot used is a scatterplot3d
plot.
1 2 | plotMotionSingleFrame(xyzList, childs, frame, lims, rotateAngle = 0,
viewAngle = 40, mainTitle = frame, ...)
|
xyzList |
a list of |
childs |
the |
frame |
a frame number (currently unvalidated!) |
lims |
a list of limits for the x, y, z axes. Format: list(limX = c(min, max), limY = c(min, max), limZ = c(min, max)) |
rotateAngle |
angle in degrees to rotate the entire skeleton around the Y (upwards) axis, defaults to 0 |
viewAngle |
the |
mainTitle |
the |
... |
additional arguments to the |
A blog post describing the package with more examples: http://giorasimchoni.com/2017/08/08/2017-08-08-lambada-the-mocap-package/
The CMU Graphics Lab Motion Capture Database: http://mocap.cs.cmu.edu/
1 2 3 4 5 6 7 8 9 10 11 12 13 | asfFilePath <- system.file("extdata", "lambada.asf", package = "mocap")
asf <- readASF(asfFilePath)
amcFilePath <- system.file("extdata", "lambada.amc", package = "mocap")
amc <- readAMC(amcFilePath, asf)
xyz <- getMotionData(asf, amc)
limX <- c(min(unlist(lapply(xyz, function(x) min(x[, 1])))),
max(unlist(lapply(xyz, function(x) max(x[, 1])))))
limY <- c(min(unlist(lapply(xyz, function(x) min(x[, 2])))),
max(unlist(lapply(xyz, function(x) max(x[, 2])))))
limZ <- c(min(unlist(lapply(xyz, function(x) min(x[, 3])))),
max(unlist(lapply(xyz, function(x) max(x[, 3])))))
lims <- list(limX = limX, limY = limY, limZ = limZ)
plotMotionSingleFrame(list(xyz), asf$childs, 1, lims)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.