create_rotation_matrix: Create a 3D Rotation Matrix

View source: R/create_rotation_matrix.R

create_rotation_matrixR Documentation

Create a 3D Rotation Matrix

Description

Generates a 3x3 rotation matrix for rotating points in 3D space around the x, y, or z axis by a specified angle in degrees.

Usage

create_rotation_matrix(angle_deg, axis)

Arguments

angle_deg

Numeric. The rotation angle in degrees.

axis

Character. The axis of rotation: "x", "y", or "z".

Value

A 3x3 numeric matrix representing the rotation.

Examples

create_rotation_matrix(90, "z")


Kneerav/biomechanics documentation built on July 16, 2025, 4:51 p.m.