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

How to arrange RGL 3d plot in grid using tagList from htmltools?

From this answer I have been able to produce rgl 3d objects (specifically scatter3d from the car package) in a loop and output it as html in my knitr document. However, I find that the images are displayed in a vertical strip. I would like to tile…
Alex
  • 15,186
  • 15
  • 73
  • 127
0
votes
1 answer

rgl - color scale

I want to add a color scale to my plot in R, but I really have no Idea how to do it. I used the rgl-package. Can you help me? With legend3d it always says: argument "legend" is missing, with no defaults Thank you very much! library(rgl) ### als…
Bobby23
  • 1
  • 2
0
votes
2 answers

add sphere in rgl

I am trying to add a sphere in a 3D graphs with rgl but I cannot manage to get what I want. My data looks like that: L a b 89.09 -0.78 66.41 89.41 -0.55 61.08 89.18 -0.46 61.86 First I plot my points using the plot3d open3d() …
fatofi
  • 3
  • 2
0
votes
1 answer

3D plot in R using persp3D - Axis issues

I have a matrix (m) and I'm trying to plot a 3D representation of that matrix. > dput(head(m)) structure(c(21930, 21844, 21758, 21672, 21586, 21500, 22016, 21930, 21844, 21758, 21672, 21586, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
SilvanD
  • 325
  • 2
  • 14
0
votes
1 answer

akima and/or rgl are shutting down Rstudio

the following procedure is shutting dow my Rstudio: I understand is any of the akima or rgl packages or both. How to solve this? data here s=read.csv("GRVMAX tadpoles.csv") require(nlme) t=s[s$SPP==…
Agus camacho
  • 868
  • 2
  • 9
  • 24
0
votes
1 answer

How to find the number of spheroids bound by two parallel planes or cuboid, and plot these?

I am looking for a library or other source code that will help me display non-intersecting spheres or spheroids, not necessarily a bin packing issue, but it could be. Each of these spheres can also contain a further set of much smaller spheres…
klonowsk
  • 1
  • 2
0
votes
1 answer

Installation of package ‘rgl’ had non-zero exit status

I'm running R in Centos 6. I needed to remove some packages in R. After doing so and trying to reinstall, I was told that the rgl package needed to be installed. Now when I try to install it, I get the following error.…
user2223056
0
votes
1 answer

Superscript and subscript in rgl

I want to create labels in an rgl plot that have subscripts and superscripts using text3d. open3d(windowRect=c(500,500,1000,1000)) text3d(0, 0, 0, expression(CO[2])) produces an image that looks like this: And,…
dww
  • 30,425
  • 5
  • 68
  • 111
0
votes
1 answer

How to use rgl package with a non-numeric axis

I want to use rgl.surface(x,z,y...) to draw a 3d graph. However, my z axis is not numeric, like Mon, Tues, Wens.... So how can I use rgl.surface, or other functions to draw a graph?
Feng Chen
  • 2,139
  • 4
  • 33
  • 62
0
votes
1 answer

Cannot plot rglscene object by means of plot3d() function of rgl R package

I am having trouble with the R package,rgl (version 0.95.1441), in particular, I cannot reproduce the code from the Examples section of the documentation of the scene3d rgl function: http://www.inside-r.org/packages/cran/rgl/docs/plot3d.rglscene I…
Denis
  • 315
  • 4
  • 11
0
votes
1 answer

Shiny can not display different "webGLOutput" on different tab panels?

I am trying to displaying different 3D plots in different tab panels, but I found that 3D plot only displayed in the first tab panel. According to this post, plotOutputs parameter outputId should be unique, and in my case IDs are unique over the…
just_rookie
  • 873
  • 12
  • 33
0
votes
1 answer

Rotate camera along "eye" direction in rgl

In rgl, you can set up camera direction with rgl.viewpoint. It accepts theta, phi: polar coordinates. They specify the position of the camera looking at the origin. However, there is yet another one degree of freedom: angle of rotation of the camera…
Ilya V. Schurov
  • 7,687
  • 2
  • 40
  • 78
0
votes
0 answers

plot3d: rgl.postscript adding diagonals unexpectedly

I would like to save the plot require(rgl) C <- rep(1,50) u <- seq(from=0,to=1, by=0.02) v <- rep(0.5,50) my3d <- plot3d(u, v, C, xlab="u", ylab="v", zlab="C", type = "h", col="blue", size=2, add = FALSE, xlim = c(0,1), ylim = c(0,1), zlim =…
0
votes
0 answers

Stacking several 2D plots into a 3D plot

I want to make a 3d plot out of a number of 5 filled.contour plots by stacking them vertically. It is possible with other software, but I need to use R. I suppose more exactly this is a 4d plot The plots should have the same colour scale and a…
0
votes
1 answer

Can't install rgl in order to install TSclust

Not sure what is happening but I can't install rgl with or without flag: > install.packages("rgl", dependencies=TRUE) also installing the dependencies ‘mime’, ‘stringi’, ‘magrittr’, ‘bitops’, ‘evaluate’, ‘digest’, ‘formatR’, ‘highr’, ‘markdown’,…
Mona Jalal
  • 34,860
  • 64
  • 239
  • 408