oblique_basis: Return the basis of an oblique frame

Description Usage Arguments Value Examples

View source: R/oblique_basis.r

Description

Rotates a basis returning (p, 2) basis describing oblique_frame() Used to create an oblique tour by small changes to the rotation.

Usage

1
oblique_basis(basis = NULL, manip_var, theta = NULL, phi = NULL)

Arguments

basis

A (p, d) dim orthonormal numeric matrix. If it's left null, random basis will be used.

manip_var

Number of the column/dimension to rotate.

theta

Angle in radians of "in-plane" rotation, on the XY plane of the reference frame. Required, no default. If left NULL, will initialize the radial angle of the manip_var.'

phi

Phi is angle in radians of the "out-of-plane" rotation, the z-axis of the reference frame. Required, no default.

Value

(p, 2) matrix of the rotated basis

Examples

1
2
3
4
5
rb <- tourr::basis_random(n = 6)
theta <- runif(1, 0, 2*pi)
phi <- runif(1, 0, 2*pi)

oblique_basis(basis = rb, manip_var = 4, theta, phi)

nspyrison/spinifex documentation built on Aug. 23, 2019, 1:21 p.m.