Questions tagged [rgl]

`rgl` is a 3D visualization device system for R, using OpenGL as the rendering backend.

The rgl package is a 3D visualization device system for R based on OpenGL. 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.

Features:

  • Cross-platform (Mac OS X, Win32, Unix/X11)
  • R programming interface
  • Interactive viewpoint navigation
  • Automatic data focus Geometry primitives: points, lines, triangles, quads, texts, spheres, 3D sprites, particles, terrain
  • Up to eight light sources
  • Alpha-blending (transparency)
  • Side-dependant rendering
  • Texture-mapping with mipmap support
  • Environmental effects: fogging, background sphere
  • Bounding box with axis ticks marks
  • Undo operation

Resources:

558 questions
0
votes
0 answers

Plotting with rgl and x11

I'm sorry if this isn't the place for posting this kind of questions, but i've tried and googled everything and still i'm not able to find an answer. I'm trying to plot ANYTHING in rgl from r, but when i do it, being the code anything, the 3d plot…
Ghost
  • 1,426
  • 5
  • 19
  • 38
0
votes
1 answer

Rstudio crushing when calling rgl and knitr in ioslides presentation

My RStudio session is crushing when trying to draw an rgl 3d plot using knitr in ioslides html presentation. Any ideas how to prevent it? My chunk: ```{r setup, results='asis'} library(knitr) library(rgl) knit_hooks$set(webgl =…
Leni Ohnesorge
  • 716
  • 8
  • 19
0
votes
1 answer

rgl snapshot fails in Shiny app

The rgl.snapshot fails when using the patched (install_github("rgl", "trestletech", "js-class")) rgl version with Shiny. The rgl.snapshot works with rgl >= 0.95.1247. However, due to the known issue of the latest rgl not working with shiny, the…
sredemption
  • 145
  • 1
  • 6
0
votes
1 answer

how to control font and text bold in shinyRGL 3D plot

I set up a shiny app with the 'shinyRGL' package to produce a rotatable cube like the one in the post here. what I get, with 5 points is this: I want to reduce the size of the labels, so I use cex=0.4 for instance, but then it becomes unreadable…
agenis
  • 8,069
  • 5
  • 53
  • 102
0
votes
1 answer

Error in installing "rgl" package in Yosemite 10.10.4

I get this message whenever I try to install rgl package on Yosemite 10.10.4 Error : .onLoad failed in loadNamespace() for 'rgl', details: call: dyn.load(file, DLLpath = DLLpath, ...) error: unable to load shared object…
0
votes
1 answer

R add colormap legend and ticked axis to rgl surface3d

I wrote test code below with rgl package support. How could I add a color scale to this plot? Thank you. require(rgl); x=1:100; y=1:100; z=matrix(sort(abs(rnorm(100*100,50,30) )),100,100) H <- z Hlim <- round(range(H[!is.na(H)])) Hlen <- Hlim[2] -…
Lele Shu
  • 63
  • 1
  • 6
0
votes
0 answers

Cannot interact with rgl plots on Debian linux

The 3D plot using rgl cannot interact with mouse on my linux (specifically Debian 8 Jessie with RGL 0.95.1247). Just a RGL device window with fixed size is shown. I cannot even google out realted problems. Is it from my setting flaws? code and…
caesar0301
  • 1,913
  • 2
  • 22
  • 24
0
votes
1 answer

how to insert snapshots from rgl window into ordinary R plot

I am using R package rgl to create interactive plots and then its function rgl.snapshot to export images from them. I am wondering, however, if there is a way how to insert snapshots from the interactive rgl plot directly into insets of an ordinary…
0
votes
0 answers

R: plot3d - How to sort x and y variables while keeping z associated with the correct pair?

I'm attempting to plot a surface in 3 dimensions using plot3D but I'm running into problems. I'm hoping you guys could help or at least point me in the right direction. I'm open to using a different package if that's the solution. I'm reading in a…
jrp355
  • 83
  • 8
0
votes
0 answers

reverse longitudinal axis in spherical plot in R package sphereplot

I am plotting spherical coordinates using R's sphereplot package (depends on rgl plackage) with the function rgl.sphgrid. I am able to plot my data, but the default for the plotting setup is to have the degrees longitude go counterclockwise around…
mdhunstiger
  • 3
  • 1
  • 1
  • 3
0
votes
1 answer

Add 2D conditional distributions (in a third dimension) to 2D scatterplot in R

Can anyone think of a way to add, to a 2D scatterplot, a third dimension that houses distinct distributions for Y|X=120, Y|X=140, and Y|X=160? I'm trying to include theoretical standard normals for starters (but would eventually like to include the…
Pat W.
  • 1,801
  • 2
  • 26
  • 36
0
votes
2 answers

R: Is it possible to use RGL in x64 Windows?

Is it possible to use the R package 'RGL' in x64 Windows? RGL Website
Thomas Bratt
  • 48,038
  • 36
  • 121
  • 139
0
votes
2 answers

Plotting ellipsoids / oblate spheroids in rgl

I have been using rgl to plot spheres, but now I need to plot ellipsoids. The package includes ellipse3d; however, this seems to be for fitting ellipsoids to data, using matrices and stuff I'm not very good at. What I want is a simple way to plot…
Sam
  • 11
  • 1
0
votes
1 answer

rgl plot3d plotting points (spheres) and connecting them with single line

I am using the plot3d function from the rgl package. I have generated spheres using xyz co-ordinate data and I want to connect them with single line. Here is my code: file=read.table("input.txt") df=data.frame(x=file[,1],y=file[,2],z=file[,3],…
0
votes
0 answers

rgl.postscript exporting zero-length files

I've been trying (unsuccessfully) to export a postscript or pdf snapshot of a persp3d plot using rgl.postscript. I've added code from ?rgl.postscript which works for me without error in R but produces a 0 KB postscript file. Any ideas? x <- y <-…
Paul Regular
  • 498
  • 4
  • 8