R: Interactive 3D WebGL plot of time-space cube with RGL

April 24, 2012
By

(This article was first published on geolabs » R, and kindly contributed to R-bloggers)

With the recently relased version of the package RGL (V. 0.92.879) there is a new option to publish 3D plots as an interactive WebGL graphic.
Nearly every 3D plot you set up in a RGL window can be exportet via a very easy command. Just plot as usual into your rgl device and then use the command “writeWebGL()”.

Preview of the TimeSpace Cube WebGL Plot

Time Space Cube sample:

Dependable on your hardware and software specifications (graphics have to support a newer OpenGL version) you’ll be able to open my try in your browser window:

Click here to open my WebGL sample in a new window (~3MB)

Here the command to export your RGL window to a webpage:

browseURL(paste(“file://”, writeWebGL(dir=file.path(tempdir(), “webGL”), width=700), sep=”"))


To leave a comment for the author, please follow the link and comment on his blog: geolabs » R.

R-bloggers.com offers daily e-mail updates about R news and tutorials on topics such as: visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...



If you got this far, why not subscribe for updates from the site? Choose your flavor: e-mail, twitter, RSS, or facebook...

Comments are closed.