rgl (version 0.83-3)

spin3d: Create a function to spin a scene at a fixed rate

Description

This creates a function to use with play3d to spin an rgl scene at a fixed rate.

Usage

spin3d(axis = c(0, 0, 1), rpm = 5)

Arguments

axis
The desired axis of rotation
rpm
The rotation speed in rotations per minute

Value

  • 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.

See Also

play3d to play the animation

Examples

Run this code
open3d()
plot3d(oh3d(col="lightblue", alpha=0.5))
play3d(spin3d(axis=c(1,0,0), rpm=20), duration=3)

Run the code above in your browser using DataLab