Description Usage Arguments Details Value Examples
Takes an data.frame of positions (coded with x,y,z) and returns their position in NPC space.
1 | transform_3d_positions_to_image(position_data, projection, worldToCamera)
|
projection |
Matrix describing the camera projection. |
worldToCamera |
Matrix describing the camera position. |
x |
Path data. |
Note: Suggestion by https://stackoverflow.com/a/26413765
Returns transformed path.
1 2 3 4 | projection <- matrix(c(1,0,0,0,0,1,0,0,0,0,1,-1,0,0,0,1),nrow=4,ncol = 4, byrow = TRUE)
worldToCamera <- matrix(c(-1,0,0,-25,0,0,-1,0,0,1,0,-30,0,0,0,1),nrow=4,ncol = 4, byrow = TRUE)
position_data <- get_participants_positions_XYZ(db = db, session.ids = session.ids, scene.name = scene.name )
position_data <- transform_3d_positions_to_image(position_data,projection,worldToCamera)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.