cas_rot_matrix3d | R Documentation |
Calculates a 3D rotation matrix from a given axis and angle. The axis is defined by x|>ysym()
. The Rotation will be done around the axis defined by
angle|>ysym()
and the root. The angle will be applied by the right hand rule.
cas_rot_matrix3d(x, angle)
x |
unit vector c(x1,x2,x3)|>ysym() |
angle |
vector of angel in radiant c(angle)|>ysym() |
The calculation is done by Ryacas (yacas) and uses symbolic math. The package Ryacas and the software YACAS needs to be installed.
Returns 3D rotation matrix for given axis and angle.
Florian Wagner florian.wagner@wagnius.ch
library(Ryacas)
rot_matrix <- cas_rot_matrix3d(matrix(c(1,2,3))|>ysym(),c(-pi)|>ysym())
rot_matrix
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.