High level functions

Generic functions for plotting points or surfaces.

plot3d()

3D scatterplot

persp3d()

Surface plots

Methods

persp3d(<function>) plot3d(<function>)

Plot a function of two variables

plot3d(<formula>) persp3d(<formula>)

Methods for formulas

plot3d(<lm>)

Method for plotting simple linear fit

Adding to plots

These add to an existing plot.

Primitive shapes

points3d() lines3d() segments3d() triangles3d() quads3d()

Add primitive shape

Other shapes

text3d() texts3d()

Add text to plot

abclines3d()

Lines intersecting the bounding box

arc3d()

Draw arcs

planes3d() clipplanes3d()

Add planes

sprites3d() particles3d()

Add sprites

spheres3d()

Add spheres

surface3d() terrain3d()

Add surface

drape3d()

Drape lines over a scene.

shadow3d()

Project shadows of mesh onto object.

arrow3d()

Draw an arrow

pch3d()

Plot symbols similar to base graphics

plotmath3d()

Draw text using base graphics math plotting

rgl.texts() rglFonts()

Low-level functions for plotting text

Axes and "decorations"

axes3d() box3d() title3d() axis3d() mtext3d()

Draw boxes, axes and other text outside the data

rgl.bbox() bbox3d()

Set up bounding box decoration

decorate3d()

Add decorations to a 3D plot

aspect3d()

Set the aspect ratios of the current plot

bg3d() rgl.bg()

Set up background

bgplot3d() legend3d()

Use base graphics for RGL background

show2d()

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

grid3d()

Add a grid to a 3D plot

thigmophobe3d()

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

setAxisCallbacks()

User-defined axis labelling callbacks.

rgl.setAxisCallback() rgl.getAxisCallback()

User-defined axis labelling callbacks.

Controlling the look of the scene

These functions control the way objects appear.

light3d() rgl.light()

Add light source

rgl.material() material3d()

Set material properties

par3d()

Set or query RGL parameters

view3d() rgl.viewpoint()

Set up viewpoint

observer3d()

Set the observer location

rglExtrafonts()

Register extra fonts

Complex shapes

These functions construct and display complex shapes.

mesh3d() qmesh3d() tmesh3d()

Construct 3D mesh objects

dot3d() wire3d() shade3d()

Draw 3D mesh objects

cube3d() tetrahedron3d() octahedron3d() icosahedron3d() dodecahedron3d() cuboctahedron3d() oh3d()

Sample 3D mesh objects

cylinder3d()

Create cylindrical or "tube" plots

polygon3d()

Draw a polygon in three dimensions

extrude3d()

Generate extrusion mesh

turn3d()

Create a solid of rotation from a two-dimensional curve

ellipse3d()

Make an ellipsoid

shapelist3d()

Create and plot a list of shapes

as.mesh3d(<ashape3d>)

Convert alpha-shape surface of a cloud of points to RGL mesh object

as.mesh3d()

Convert object to mesh object

as.mesh3d(<rglId>)

Convert object in plot to RGL mesh object

plot3d(<deldir>) persp3d(<deldir>) as.mesh3d(<deldir>)

Plot a Delaunay triangulation

plot3d(<triSht>) persp3d(<triSht>) as.mesh3d(<triSht>) plot3d(<tri>) persp3d(<tri>) as.mesh3d(<tri>)

Plot an interp or tripack Delaunay triangulation

as.triangles3d()

Convert an object to triangles

as.tmesh3d()

Convert object to a triangular mesh

mergeVertices()

Merge duplicate vertices in mesh object

Contouring

These functions are related to showing contour lines.

contourLines3d() filledContour3d()

Draw contours on a surface

clipMesh3d() clipObj3d()

Clip mesh or RGL object to general region

Modifying shapes

addNormals()

Add normal vectors to objects so they render more smoothly

subdivision3d() divide.mesh3d() normalize.mesh3d() deform.mesh3d()

Subdivide a mesh

merge(<mesh3d>)

Merge RGL mesh objects

facing3d() projectDown()

Subset an object to parts facing in a particular direction

Multi-figure layouts

subsceneList() mfrow3d() layout3d() next3d() clearSubsceneList()

Set up multiple figure layouts

Functions relating to subscenes

subsceneList() mfrow3d() layout3d() next3d() clearSubsceneList()

Set up multiple figure layouts

newSubscene3d() currentSubscene3d() useSubscene3d() addToSubscene3d() delFromSubscene3d() gc3d()

Create, select or modify a subscene

subsceneInfo()

Get information on subscenes

Documents and presentations

setupKnitr() hook_rgl() hook_webgl() hook_rglchunk()

Displaying RGL scenes in knitr documents

rgl.snapshot() snapshot3d()

Export screenshot

play3d() movie3d()

Play animation of RGL scene

spin3d()

Create a function to spin a scene at a fixed rate

par3dinterp()

Interpolator for par3d parameters

WebGL displays

subsetControl() propertyControl()

Controls to use with playwidget()

clipplaneControl()

Sets attributes of a clipping plane

ageControl()

Set attributes of vertices based on their age

vertexControl()

Set attributes of vertices

par3dinterpControl()

Control RGL widget like par3dinterp()

playwidget()

Add a widget to play animations

toggleWidget()

An HTML widget to toggle display of elements of a scene

figWidth() figHeight()

Get R Markdown figure dimensions in pixels

rglShared()

Create shared data from an RGL object

rglMouse()

Generate HTML code to select mouse mode

asRow() getWidgetId()

Convenience functions for RGL HTML layouts

Shiny

sceneChange() registerSceneChange()

Make large change to a scene from Shiny

shinyGetPar3d() shinySetPar3d() shinyResetBrush()

Communicate RGL parameters between R and Javascript in Shiny

rglwidgetOutput() renderRglwidget() playwidgetOutput() renderPlaywidget()

Functions for integration of RGL widgets into Shiny app

Import and export

scene3d() plot3d(<rglscene>) plot3d(<rglobject>) print(<rglscene>) print(<rglobject>)

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

rglwidget()

An htmlwidget to hold an RGL scene

writeASY()

Write Asymptote code for an RGL scene

writePLY()

Write Stanford PLY format files

writeOBJ() readOBJ()

Read and write Wavefront OBJ format files

readSTL() writeSTL()

Read and write STL (stereolithography) format files

rglToLattice() rglToBase()

Convert RGL userMatrix to lattice or base angles

rgl.postscript()

Export vector graphics

Miscellaneous utility functions

Opening, closing and changing the display

open3d() close3d() cur3d() set3d() getr3dDefaults() r3dDefaults

Work with RGL windows

.check3d()

Check for an open RGL window.

rgl.useNULL()

Report default use of null device

rgl.bringtotop()

Assign focus to an RGL window

rgl.open() rgl.close() rgl.cur() rgl.dev.list() rgl.set() rgl.quit()

Low level window interface

Manipulating objects in the display

clear3d() pop3d() ids3d()

Scene management

identify3d()

Identify points in plot

selectpoints3d()

Select points from a scene

rgl.select3d() select3d() selectionFunction3d()

Select a rectangle in an RGL scene

rgl.select()

Switch to select mode, and return the mouse position selected

rgl.attrib()

Get information about shapes

rgl.attrib.info() rgl.attrib.count()

Get information about attributes of objects

rgl.pixels()

Extract pixel information from window

Working with coordinates

identityMatrix() scaleMatrix() translationMatrix() rotationMatrix() asHomogeneous() asEuclidean() asHomogeneous2() asEuclidean2() scale3d() translate3d() rotate3d() transform3d()

Work with homogeneous coordinates

TCL/TK

tkrgl

The former tkrgl package

tkspin3d()

Create TCL/TK controller for RGL window

tkspinControl()

Create a spin control in a TCL/TK window

tkpar3dsave()

Modal dialog for saving par3d settings

Unclassifiable miscellany

import

Imported from magrittr

GramSchmidt()

The Gram-Schmidt algorithm

triangulate()

Triangulate a two-dimensional polygon

rgl.points() rgl.lines() rgl.linestrips() rgl.triangles() rgl.quads()

Add primitive set shape

rgl.user2window() rgl.window2user() rgl.projection()

Convert between RGL user and window coordinates

rgl.setMouseCallbacks() rgl.getMouseCallbacks() rgl.setWheelCallback() rgl.getWheelCallback()

User callbacks on mouse events

setUserCallbacks()

Set mouse callbacks in R or Javascript code

setUserShaders()

Set user-defined shaders for RGL objects.

makeDependency()

Process Javascript for HTML dependency

setGraphicsDelay()

Set a one-time slowdown on opening standard graphics

rglId() lowlevel() highlevel() print(<rglId>)

RGL id values

in_pkgdown_example()

Are we running in a pkgdown example?

facing3d() projectDown()

Subset an object to parts facing in a particular direction

expect_known_scene()

Helper for testthat testing.

all.equal(<mesh3d>) compare_proxy.mesh3d()

Compare mesh3d objects in a meaningful way.

General documentation

rgl-package

3D visualization device system

r3d

Generic 3D interface

Obsolete functions

ageSetter()

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

elementId2Prefix()

Use widget with old-style controls

propertySlider() propertySetter() par3dinterpSetter() matrixSetter() vertexSetter()

Obsolete functions to write HTML/Javascript code to control a WebGL display

rgl.init()

Initializing RGL

rgl.surface()

Add surface (obsolete)

Sweave.snapshot() rgl.Sweave() rgl.Sweave.off()

Integrating RGL with Sweave

subsetSlider() subsetSetter() clipplaneSlider() toggleButton()

Obsolete functions to write HTML/Javascript code to control a WebGL display

writeWebGL()

Write scene to HTML (obsolete)