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
5
votes
1 answer

how to add axes to 3D histogram (rgl)

I build a histogram in R using the rgl package. library(rgl) rgl.bg(col="#cccccc") x<-rnorm(2500) y<-rnorm(2500) hist3d(x, y, alpha=0.8, nclass=10, scale=30) How can I add an axis with labels on the…
Andy
  • 263
  • 2
  • 5
  • 16
5
votes
1 answer

rgl plot: point size does not change when saving as postscript

I'm trying to generate a 3d scatterplot using rgl. It looks great on my screen, but whenever I export it as a PDF (or any other postscript format) it completely ignores any size specifications I use. (I'm running RGui v.2.15.1 and rgl v.0.92.892 on…
5
votes
2 answers

R rgl distance between axis ticks and tick labels

I am plotting some point data using plot3d(). I would like to bring my y axis tick labels a little closer to my y axis tick marks. The best way I can think of doing this is to 1) plot the data first, without drawing the axes 2) call on axis3d() to…
Vanessa
  • 51
  • 1
  • 2
4
votes
2 answers

Cannot change text size in rgl plot

I have a problem changing the text size of a 3d plot I generated with the package rgl. Everything works fine, but I can't effectively change the cex properties of an 3d object. I run R 2.14.1 (2011-12-22) under 64bit Ubuntu 10.04 LTS…
TwistTue
  • 41
  • 2
4
votes
1 answer

How do I install the R package rgl on Ubuntu 9.10?

Possible Duplicate: Problem Installing rgl I'm trying to install the R package rgl on Ubuntu 9.10. I'm using R version 2.12.1. I got the following error: "configure: error: missing required header GL/gl.h" I asked this question earlier without…
BenH
  • 2,100
  • 2
  • 22
  • 33
4
votes
1 answer

`rgl` crashes R 4.2.0 in RStudio

The new release of R version 4.2.0 will crash when loading the rgl package if in RStudio. What can I do about it?
user2554330
  • 37,248
  • 4
  • 43
  • 90
4
votes
1 answer

R + Shiny + RGL: Recommended Way to Combine Shiny and RGL

I am trying to create a Shiny app that displays an RGL visualisation (which is nothing else than a set of polished sticks and spheres). Please have a look at the code for the visualisation below library(rgl) library(tidyverse) sphere1.f <-…
larry77
  • 1,309
  • 14
  • 29
4
votes
1 answer

Julia equivalent for rgl R package?

I would like to know whether there exists in Julia something which would be rougly equivalent to the rgl package in R language; i.e., a library allowing for a dynamic/interactive representation of 3D plots, 3D surfaces, etc. A bit of context: if…
Philopolis
  • 515
  • 4
  • 13
4
votes
2 answers

Drawing a smooth implicit surface with misc3d

The misc3d package provides a great implementation of the marching cubes algorithm, allowing to plot implicit surfaces. For example, let's plot a Dupin cyclide: a = 0.94; mu = 0.56; c = 0.34 # cyclide parameters f <- function(x, y, z, a, c, mu){ #…
Stéphane Laurent
  • 75,186
  • 15
  • 119
  • 225
4
votes
3 answers

rgl: > Error in rgl.clear(type, subscene = subscene) : object 'rgl_clear' not found

Doing (R3.4, ubuntu 16.04, rgl 0.95.1441): library(rgl) open3d() returns: Error in rgl.clear(type, subscene = subscene) : object 'rgl_clear' not found x <- sort(rnorm(1000)) y <- rnorm(1000) z <- rnorm(1000) +…
user189035
  • 5,589
  • 13
  • 52
  • 112
4
votes
0 answers

HTML 'knitr' files containing dynamic 'rgl' plots not displaying correctly in RStudio

In Rstudio I am using the 'rgl' package to produce 3d plots and then 'knitr' to turn these into html files that the user can interact with. I have run into a couple of issues that I think are independent but hoping to resolve one at a time (in case…
A Sutton
  • 83
  • 5
4
votes
1 answer

How can I change the size of rgl plots in Shiny RMarkdown?

I'm creating a Shiny document using RMarkdown and am including reactive plots from rgl. I cannot, however, change the viewport size of the rendered plots. That is, I cannot change the height and width of the space in which the plots render. How…
4
votes
2 answers

R transparent planes3d should not hide plot3d points/spheres

I want to put points/spheres and a plane in one 3d-plot. I would like the plane to be have an alpha-transparency of ~0.5 (it should neither be completely transparent nor completely opaque). So that I can see the points/spheres and the axis through…
Jakob
  • 1,063
  • 9
  • 17
4
votes
3 answers

Why is my 3D plot not showing up in R Studio plot viewer?

I normally don't have a problem viewing plots in RStudio (version 1.0.44), but when I try to view a 3D plot created with the "rgl" package, nothing appears in my RStudio plot viewer. I am able to plot without a problem the plot(cars) scatterplot.…
pau
  • 51
  • 1
  • 1
  • 5
4
votes
3 answers

rgl: drawing a cube with colored faces, vertex points and lines

To demonstrate the effect of linear transformations in 3D, x -> A x, I want to draw a cube and show its transformation under A. For this, I need to color each face separately, and also show the vertex points and the lines that outline each face. I…
user101089
  • 3,756
  • 1
  • 26
  • 53