S.theta: Rotate around vertical axis by theta degrees

View source: R/S.theta.R

S.thetaR Documentation

Rotate around vertical axis by theta degrees

Description

Calculates the matrix to rotate around the vertical axis of a 3D plot by theta degrees

Usage

S.theta(theta)

Arguments

theta

Angle of rotation

Details

The userMatrix for spinning has the form E.phi(phi) %*% S.theta(theta)

Value

Returns the 4 x 4 rotation matrix

Author(s)

Georges Monette

See Also

E.phi, ~~~

Examples

##---- Should be DIRECTLY executable !! ----
##-- ==>  Define data, use random,
##--	or do  help(data=index)  for the standard data sets.

## The function is currently defined as
function( theta ) {
    # rotate through vertical axis through phi degrees
    theta = theta *2*pi/360
    cbind( c(cos(theta), 0,sin(theta),0), c(0,1,0,0), c(-sin(theta), 0, cos(theta),0), c(0,0,0,1))
  }

gmonette/p3d documentation built on Nov. 16, 2023, 11:31 p.m.