spin3d {rgl}R Documentation

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.

Author(s)

Duncan Murdoch

See Also

play3d to play the animation

Examples

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

[Package rgl version 0.92.798 Index]