cas_rot_matrix3d: CAS 3d rotation matrix

View source: R/yacas.R

cas_rot_matrix3dR Documentation

CAS 3d rotation matrix

Description

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.

Usage

cas_rot_matrix3d(x, angle)

Arguments

x

unit vector c(x1,x2,x3)|>ysym()

angle

vector of angel in radiant c(angle)|>ysym()

Details

The calculation is done by Ryacas (yacas) and uses symbolic math. The package Ryacas and the software YACAS needs to be installed.

http://www.yacas.org/

Value

Returns 3D rotation matrix for given axis and angle.

Author(s)

Florian Wagner florian.wagner@wagnius.ch

Examples

library(Ryacas)
rot_matrix <- cas_rot_matrix3d(matrix(c(1,2,3))|>ysym(),c(-pi)|>ysym())
rot_matrix

wagnius-GmbH/slvwagner documentation built on Jan. 19, 2025, 7:10 a.m.