Learn R Programming

rotations (version 1.6.5)

mis.angle: Misorientation angle

Description

Compute the misorientation angle of a rotation.

Usage

mis.angle(x)

# S3 method for SO3 mis.angle(x)

# S3 method for Q4 mis.angle(x)

Value

Angle of rotation.

Arguments

x

\(n\times p\) matrix where each row corresponds to a random rotation in matrix (\(p=9\)) or quaternion (\(p=4\)) form.

Details

Every rotation can be thought of as some reference coordinate system rotated about an axis through an angle. These quantities are referred to as the misorientation axis and misorientation angle, respectively, in the material sciences literature. This function returns the misorentation angle associated with a rotation assuming the reference coordinate system is the identity.

See Also

mis.axis

Examples

Run this code
rs <- rcayley(20, kappa = 20)
Rs <- genR(rs, S = id.SO3)
mis.angle(Rs)

#If the central orientation is id.SO3 then mis.angle(Rs) and abs(rs) are equal
all.equal(mis.angle(Rs), abs(rs))  #TRUE

#For other reference frames, the data must be centered first
S <- genR(pi/2)
RsS <- genR(rs, S = S)
mis.axis(RsS-S)
all.equal(mis.angle(RsS-S),abs(rs)) #TRUE

#If the central orientation is NOT id.SO3 then mis.angle(Rs) and abs(rs) are usual unequal
Rs <- genR(rs, S = genR(pi/8))
all.equal(mis.angle(Rs), abs(rs))  #Mean relative difference > 0

Run the code above in your browser using DataLab