Rotate coordinates in Cartesian space (2D or 3D)
Source:R/transform_coords_rotate.R
rotate_coords.RdAutomatically detects whether data are 2D or 3D and applies the corresponding rotation method.
Arguments
- data
movement data frame with columns: time, individual, keypoint, x, y, z (optional)
- alignment_points
character vector of length 2 specifying the keypoints used for alignment
- align_perpendicular
logical; if TRUE, alignment_points are rotated to be perpendicular to the 0-degree axis (y-axis). If FALSE (default), they are aligned with the x-axis.