math_rot_transform: Transform vector by a rotation matrix

View source: R/math.R

math_rot_transformR Documentation

Transform vector by a rotation matrix

Description

transforms a given vector by a given rotation matrix using matirx multiplication

Usage

math_rot_transform(x, rot_matrix)

Arguments

x

vector or matrix containing the coordinates

rot_matrix

2D or 3D rotation matrix

Details

rot_matrix%*%x https://en.wikipedia.org/wiki/Rotation_matrix

Value

Returns 3D rotation matrix for given axis and angle.

Author(s)

Florian Wagner florian.wagner@wagnius.ch

Examples

rot_matrix <- math_rot_matrix2d(pi/3)
p <- cbind(c(1,0), c(0,1), c(1,1))
p
math_rot_transform(p,rot_matrix)

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