rotate_coords: Rotate 3D Coordinates Using a Rotation Matrix

View source: R/rotate_coords.R

rotate_coordsR Documentation

Rotate 3D Coordinates Using a Rotation Matrix

Description

Applies a 3x3 rotation matrix to a set of 3D coordinates.

Usage

rotate_coords(x, y, z, rotation_matrix)

Arguments

x

y, z Numeric vectors of equal length representing 3D coordinates.

rotation_matrix

A 3x3 numeric matrix used to rotate the coordinates.

Value

A data frame with rotated coordinates ('x', 'y', 'z').

Examples

rot_mat <- create_rotation_matrix(90, "z")
rotate_coords(1, 0, 0, rot_mat)


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