library(rgl)
saveopts <- options(rgl.useNULL = TRUE)
open3d()
ids <- plot3d((-10):10, rnorm(21), rnorm(21))
ageControl(value=0,
births=c((-10):10),
ages = c(-5,0,5),
colors = c("green", "yellow", "red"),
objids = ids["data"])
options(saveopts)
Run the code above in your browser using DataLab