gen_rotation: Generate Rotations

View source: R/util.R

gen_rotationR Documentation

Generate Rotations

Description

This function generates a rotation matrix.

Usage

gen_rotation(p = 4, planes_angles)

Arguments

p

A numeric value (default: 4) representing the number of dimensions.

planes_angles

A numeric list which contains plane and the corresponding angle along that plane.

Value

A matrix containing the rotations.

Examples

set.seed(20240412)
rotations_4d <- list(
  list(plane = c(1, 2), angle = 60), # Rotation in the (1, 2) plane
  list(plane = c(3, 4), angle = 90)  # Rotation in the (3, 4) plane
)
gen_rotation(p = 4, planes_angles = rotations_4d)


cardinalR documentation built on Aug. 21, 2025, 5:27 p.m.