powered by
Rotates a three-column matrix whose rows are vectors in 3D space, using quaternions
rotate(x, H)
A matrix of three columns whose rows are points in 3D space
A quaternion. Does not need to have unit modulus
Returns a matrix of the same size as x
x
# NOT RUN { data(bunny) par(mfrow=c(2,2)) par(mai=rep(0,4)) p3d(rotate(bunny,Hi),box=FALSE) p3d(rotate(bunny,H1-Hi+Hj),box=FALSE) p3d(rotate(bunny,Hk),box=FALSE) p3d(rotate(bunny,Hall),box=FALSE) # }
Run the code above in your browser using DataLab