Learn R Programming

⚠️There's a newer version (1.3.1) of this package.Take me there.

rgl (version 0.100.54)

3D Visualization Using OpenGL

Description

Provides medium to high level functions for 3D interactive graphics, including functions modelled on base graphics (plot3d(), etc.) as well as functions for constructing representations of geometric objects (cube3d(), etc.). Output may be on screen using OpenGL, or to various standard 3D file formats including WebGL, PLY, OBJ, STL as well as 2D image formats, including PNG, Postscript, SVG, PGF.

Copy Link

Version

Install

install.packages('rgl')

Monthly Downloads

87,076

Version

0.100.54

License

GPL

Maintainer

Last Published

April 14th, 2020

Functions in rgl (0.100.54)

addNormals

Add normal vectors to objects so they render more smoothly.
figWidth

Get R Markdown figure dimensions in pixels.
bgplot3d

Use base graphics for RGL background
clipMesh3d

Clip mesh to general region
.check3d

Check for an open rgl window.
bg3d

Set up Background
elementId2Prefix

Use widget with old-style controls.
as.triangles3d

Convert an object to triangles.
as.mesh3d.rglId

Convert object in plot to mesh3d object.
rgl.attrib

Get information about shapes
matrices

Work with homogeneous coordinates
extrude3d

Generate extrusion mesh
clipplaneControl

Sets attributes of a clipping plane.
axes3d

Draw boxes, axes and other text outside the data
rgl.setMouseCallbacks

User callbacks on mouse events
mesh3d

3D Mesh objects
rgl.bbox

Set up Bounding Box decoration
cylinder3d

Create cylindrical or "tube" plots.
ellipse3d

Make an ellipsoid
persp3d.deldir

Plot a Delaunay triangulation.
mergeVertices

Merge duplicate vertices in mesh object
pch3d

Plot symbols similar to base graphics.
observer3d

Set the observer location.
import

Imported from magrittr
asRow

Convenience functions for rgl HTML layouts
par3d

Set or Query RGL Parameters
mfrow3d

Set up multiple figure layouts in rgl.
propertyControl

Controls to use with playwidget().
par3dinterpControl

Control rgl widget like par3dinterp().
persp3d

Surface plots
rgl.init

Initializing rgl
rgl.primitive

add primitive set shape
playwidget

Add a widget to play animations.
play3d

Play animation of rgl scene
plot3d.formula

Methods for formulas
plot3d.lm

Method for plotting simple linear fit.
identify3d

Identify points in plot.
grid3d

Add a grid to a 3D plot
persp3d.function

Plot a function of two variables
par3dinterp

Interpolator for par3d parameters
aspect3d

Set the aspect ratios of the current plot
plotmath3d

Generate sprites using base graphics math plotting.
rgl.Sweave

Integrating rgl with Sweave
rgl.open

3D visualization device system
rgl-package

3D visualization device system
readSTL

Read and write STL (stereolithography) format files
rglIds

rgl id values
rglMouse

Generate HTML code to select mouse mode.
rgl.pixels

Extract pixel information from window
persp3d.triSht

Plot an interp or tripack Delaunay triangulation.
select3d

Select a rectangle in an RGL scene
light

add light source
rgl.postscript

export screenshot
selectpoints3d

Select points from a scene
rgl.select

Switch to select mode, and return the mouse position selected.
rgl-internal

Internal rgl functions and data
planes3d

add planes
rgl.material

Generic Appearance setup
polygon3d

Triangulate and draw a polygon in three dimensions.
rglShared

Create shared data from an rgl object.
shinyGetPar3d

Communicate rgl parameters between R and Javascript in Shiny.
rglToLattice

Convert rgl userMatrix to lattice or base angles
shiny

hook_rgl

Hook functions to use with knitr
rgl.useNULL

Report default use of null device.
propertySetter

Write HTML/Javascript code to control a WebGL display.
plot3d

3D Scatterplot
tkpar3dsave

Modal dialog for saving par3d settings
setUserShaders

Set user-defined shaders for rgl objects.
tkrgl

tkrgl functions
sceneChange

Make large change to a scene from Shiny
show2d

Draw a 2D plot on a rectangle in a 3D scene.
scene3d

Saves the current scene to a variable, and displays such variables.
thigmophobe3d

Find the direction away from the closest point in a 3d projection.
rgl.user2window

Convert between rgl user and window coordinates
shapelist3d

Create and plot a list of shapes
tkspin3d

Create TCL/TK controller for rgl window
rgl.surface

add height-field surface shape
r3d

Generic 3D interface
text3d

add text
writeASY

Write Asymptote code for an rgl scene
vertexControl

Set attributes of vertices.
tkspinControl

Create a spin control in a TCL/TK window
surface3d

add height-field surface shape
rgl.snapshot

export screenshot
webGLcontrols

Write HTML/Javascript code to control a WebGL display.
sprites

add sprite set shape
rgl.attrib.info

Get information about attributes of objects
rgl.bringtotop

Assign focus to an RGL window
subdivision3d

generic subdivision surface method
turn3d

Create a solid of rotation from a two-dimensional curve.
writeOBJ

Read and write Wavefront OBJ format files
viewpoint

Set up viewpoint
writePLY

Write Stanford PLY format files
writeWebGL

Write scene to HTML.
rglwidget

An htmlwidget to hold an rgl scene.
scene

scene management
toggleWidget

An HTML widget to toggle display of elements of a scene.
subsceneInfo

Get information on subscenes
spin3d

Create a function to spin a scene at a fixed rate
subscene3d

Create, select or modify a subscene.
triangulate

Triangulate a two-dimensional polygon.
spheres3d

add sphere set shape
arrow3d

Draw an arrow in a scene.
as.mesh3d

Convert object to mesh object
ageSetter

Set WebGL scene properties based on the age of components of objects.
arc3d

Draw arcs.
points3d

add primitive set shape
as.mesh3d.ashape3d

Convert alpha-shape surface of a cloud of points to mesh3d object.
ageControl

Set attributes of vertices based on their age.
GramSchmidt

The Gram-Schmidt algorithm
abclines3d

Lines intersecting the bounding box