| rgl.snapshot {rgl} | R Documentation |
Saves the screenshot as png file.
rgl.snapshot( filename, fmt="png" ) rgl.snapshot(filename)
filename |
full path to filename |
fmt |
image export format, currently supported "png" |
Animations can be created using a loop to modify the scene and save a screenshot to a file. (See example below)
#
# create animation
#
for (i in 1:45) {
rgl.viewpoint(i,20)
print( paste("pic",formatC(i,digits=1,flag="0"),".png",sep="") )
rgl.snapshot(filename)
}