S.theta: Rotate around vertical axis by theta degrees

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/S.theta.R

Description

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

Usage

1
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
##---- 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))
  }

p3d documentation built on May 2, 2019, 5:25 p.m.