rgl: R and OpenGL

[This article was first published on Mario's Entangled Bank » R, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

There were many presentations at the useR! meeting showing off amazing graphics that I had no idea R was capable of. It is clear to me that graphically speaking I have been living in the dark ages until now.

One presentation that blew my socks off was the talk by Duncan Murdoch who is a stats prof at the University of Western Ontario. The presentation was about the rgl package that Duncan and Daniel Adler [HP] (of Universität Göttingen) have been developing over the last few years. rgl is an R package that leverages the utility of the OpenGL library for high performance graphics. OpenGL is the industry standard application programming interface (API), for producing interactive 2D and 3D graphics applications. Usually one would utilize OpenGL routines through a low(er) level language, e.g. C/C++. What Duncan and Daniel have developed, however, is a high level R wrapper that interfaces with OpenGL giving you access to its full functionality right from within R.

The web page of rgl describes the package as,

The rgl package is a visualization device system for R, using OpenGL as the rendering backend. An rgl device at its core is a real-time 3D engine written in C++. It provides an interactive viewpoint navigation facility (mouse + wheel support) and an R programming interface.

Of course, this is too big of a temptation for someone like me. By the end of the presentation I had installed the package and was exploring it’s functionality. Here’s a small teaser. It might not look like much but it is rather impressive when you keep in mind that it was done entirely in R (requiring only a few lines of code).

To leave a comment for the author, please follow the link and comment on their blog: Mario's Entangled Bank » R.

R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)