Movatterモバイル変換


[0]ホーム

URL:


RGL -3D visualization device system for R using OpenGL

CRAN statusR-CMD-check

INTRODUCTION

The RGL package is a visualization device system for R, using OpenGLor WebGL as the rendering backend. An OpenGL rgl device at its core is areal-time 3D engine written in C++. It provides an interactive viewpointnavigation facility (mouse + wheel support) and an R programminginterface. WebGL, on the other hand, is rendered in a web browser; rglproduces the input file, and the browser shows the images.

WEBSITE

Apkgdown website is here:

https://dmurdoch.github.io/rgl/

The unreleased development version website is here:

https://dmurdoch.github.io/rgl/dev/

Seethisvignette for details on producing your ownpkgdownwebsite that includesrgl graphics.

The currently active development site is here:

https://github.com/dmurdoch/rgl

INSTALLATION

Most users will want to install the latest CRAN release. For Windows,macOS and some Linux platforms, installation can be easy, as CRANdistributes binary versions:

# Install latest release from CRANinstall.packages("rgl")

To install the latest development version from Github, you’ll need todo a source install. Those aren’t easy! Try

# Install development version from Githubremotes::install_github("dmurdoch/rgl")

If that fails, read the instructions below.

Currently installs are tested on older R versions back to R 3.5.x,but this version ofrgl may work back as far as R3.3.0.

LICENSE

The software is released under the GNU Public License. SeeCOPYING for details.

FEATURES

PLATFORMS

macOS (with only partial support on Tahoe, as OpenGL support iscurrently deficient on that platform)
Windows 7+
Unix-derivatives

BUILD TOOLS

R recommended tools (gcc toolchain) On Windows, Rtools is needed.

REQUIREMENTS

For OpenGL display:

Windowing System (unix/x11 or Windows)
OpenGL Library
OpenGL Utility Library (GLU)

For WebGL display:

A browser with WebGL enabled. Seehttps://get.webgl.org.

Installing OpenGL support

Debian and variants including Ubuntu:

aptitude install libgl1-mesa-dev libglu1-mesa-dev

Fedora:

yum install mesa-libGL-devel mesa-libGLU-devel libpng-devel

macOS:

Install XQuartz.
rgl should work with XQuartz 2.7.11 or newer, but it willprobably need rebuilding if the XQuartz version changes. XQuartznormally needs re-installation whenever the macOS version changes.

Currently Tahoe, the most recent version of macOS, does not supportOpenGL in XQuartz, and it appears unlikely such support will becoming.

Windows:

Windows normally includes OpenGL support, but to get the appropriateinclude files etc., you will need the appropriate version ofRtools matchedto your R version.

Options

Thelibpng library version 1.2.9 or newer is neededfor pixmap import/export support.

Thefreetype library is needed for resizableanti-aliased fonts.

BUILDING/INSTALLING

Binary builds ofrgl are available for some platforms onCRAN.

For source builds, install the prerequisites as described above,download the tarball and at the command line run

R CMD INSTALL rgl_1.3.30.tar.gz

(with the appropriate version of the tarball). The build uses anautoconf configure script; to see the options, expand thetarball and run./configure --help.

Alternatively, in R run

install.packages("rgl")

to install from CRAN, or

remotes::install_github("dmurdoch/rgl")

to install the development version from Github.

BUILDING ON MACOS

To build on MacOS using one of the ARM64 chips (currently M1, M2 orM3), follow the instructions onhttps://mac.r-project.org/tools/ to install the toolsand libraries into/opt/R/arm64. It is important that/opt/R/arm64/bin appear in your PATH before/usr/local/bin if the latter directory has been used forx86_64 installs. If you don’t do this, or have some other error insetting things up, you’ll get a warning duringrglinstallation saying that some configure test failed, andrgl will be installed without OpenGL support.

Some versions of RStudio (including 2024.04.2+764) have a bug thatmodifies your PATH on startup and again after every packageinstallation, putting/usr/local/bin at the head of thePATH. If you are buildingrgl in such a system you need toremove files from/usr/local/bin if there’s a file with thesame name in/opt/R/arm64/bin. Hopefully this bug will befixed soon!

BUILDING WITHOUT OPENGL

As of version 0.104.1, it is possible to build the package withoutOpenGL support on Unix-alikes (including macOS) with the configureoption –disable-opengl For example,

R CMD INSTALL --configure-args="--disable-opengl" rgl_1.3.30.tar.gz

On Windows, OpenGL support cannot currently be disabled.

DOCUMENTATION and DEMOS:

library(rgl)browseVignettes("rgl")demo(rgl)

CREDITS

Daniel Adlerdadler@uni-goettingen.de
Duncan Murdochmurdoch@stats.uwo.ca
Oleg Nenadiconenadi@uni-goettingen.de
Simon Urbaneksimon.urbanek@math.uni-augsburg.de
Ming Chenmchen34@uwo.ca
Albrecht Gebhardtalbrecht.gebhardt@uni-klu.ac.at
Ben Bolkerbolker@zoo.ufl.edu
Gabor Csardicsardi@rmki.kfki.hu
Adam Strzeleckiono@java.pl
Alexander Sengersenger@physik.hu-berlin.de
The R Core Team for some code from R.
Dirk Eddelbuetteledd@debian.org
The authors of Shiny for their private RNG code.
The authors ofknitr for their graphics inclusion code.Jeroen Ooms forRtools40 andFreeTypehelp.
Yohann Demont for Shiny code, suggestions, and testing.
Joshua Ulrich for a lot of help with the Github migration. XavierFernandez i Marin for help debugging the build.
George Helffrich for draping code.
Ivan Krylov for window_group code in X11.
Michael Sumner for as.mesh3d.default enhancement.
Tomas Kalibera forwinutf8 and other help.
David Hugh-Jones for documentation improvements.
Trevor Davis for asnapshot3d patch.
Mike Stein for pointer-handling code.
Jonathon Love for theuname patch.
Volodymyr Agafonkin and many others for theearcuttriangulation code.


[8]ページ先頭

©2009-2025 Movatter.jp