spin3d {rgl} | R Documentation |
This creates a function to use with play3d
to
spin an rgl scene at a fixed rate.
spin3d(axis = c(0, 0, 1), rpm = 5)
axis |
The desired axis of rotation |
rpm |
The rotation speed in rotations per minute |
A function with header function(time)
. This function
calculates and returns a list containing userMatrix
updated by
spinning it for time
seconds at rpm
revolutions per
minute about the specified axis
.
Duncan Murdoch
play3d
to play the animation
open3d() plot3d(oh3d(col="lightblue", alpha=0.5)) play3d(spin3d(axis=c(1,0,0), rpm=20), duration=3)