plotDelaunay3D: Plot 3D Delaunay tessellation

View source: R/delaunay.R

plotDelaunay3DR Documentation

Plot 3D Delaunay tessellation

Description

Plot a 3D Delaunay tessellation with rgl.

Usage

plotDelaunay3D(
  tessellation,
  color = "distinct",
  hue = "random",
  luminosity = "light",
  alpha = 0.3,
  ...
)

Arguments

tessellation

the output of delaunay with 3D points

color

controls the filling colors of the tetrahedra, either FALSE for no color, "random" to use randomColor, or "distinct" to use distinctColorPalette

hue, luminosity

if color="random", these arguments are passed to randomColor

alpha

opacity, number between 0 and 1

...

arguments passed to material3d

Value

No value, just renders a 3D plot.

Examples

library(delaunay)
pts <- rbind(
  c(-5, -5,  16),
  c(-5,  8,   3),
  c(4,  -1,   3),
  c(4,  -5,   7),
  c(4,  -1, -10),
  c(4,  -5, -10),
  c(-5,  8, -10),
  c(-5, -5, -10)
)
tess <- delaunay(pts)
library(rgl)
open3d(windowRect = c(50, 50, 562, 562))
plotDelaunay3D(tess)

delaunay documentation built on May 31, 2023, 6:26 p.m.