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


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()”.

Click to open 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=””))

10 Responses to “R: Interactive 3D WebGL plot of time-space cube with RGL”

  1. Dr.D.K.Samuel Says:

    It will be nice if you share the R code to make the cube
    It will be more nice if the areas are filled in color

    • Benedikt Orlowski Says:

      I soon will share the code for the R Time Space Cube at this blog with some demo data.

    • Benedikt Orlowski Says:

      Alright, great! I’m impressed that there is so much interest in my experiments in qualitative gis. As there are so many who like to get the code, I will post it soon on this blog. I only need some days since I have a conference to prepare, July 10-12.

  2. […] R is a language beloved by statisticians, and RGL is a visualisation toolkit for it — which now supports an option to export a (big) web page embedding a data visualisation using WebGL. […]

  3. Roger Says:

    Hi, could you please post you R code. I think this would be interesting and helpful. Best, Roger

  4. MusX Says:

    Hi, what do you mean by “soon”? are you still going to share it?

  5. MusX Says:

    is it possible to load webgl? or export to other object which can be later loaded without need to go through all the plotting processes?

    • Benedikt Orlowski Says:

      I’m not sure what you mean with to “load webgl”. As far as I know there was no posibility to export the object e.g. into raw webgl code. But perhaps you should check the html code of the linked object…

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: