plotVoronoiOnSphere {sphereTessellation} | R Documentation |
Plot spherical Voronoï tessellation
Description
Plot a spherical Voronoï tessellation.
Usage
plotVoronoiOnSphere(
vor,
colors = "gradient",
distinctArgs = list(seedcolors = c("#ff0000", "#00ff00", "#0000ff")),
randomArgs = list(hue = "random", luminosity = "bright"),
palette = "Rocket",
bias = 1,
edges = FALSE,
sites = FALSE,
ecolor = "black",
lwd = 3,
scolor = "black",
sradius = NA,
...
)
Arguments
vor |
an output of |
colors |
controls the filling colors of the triangles, either
|
distinctArgs |
if |
randomArgs |
if |
palette |
this argument is used only when |
bias |
this argument is used only when |
edges |
Boolean, whether to plot the edges |
sites |
Boolean, whether to plot the Voronoï sites |
ecolor |
a color for the edges |
lwd |
graphical parameter for the edges, if they are plotted |
scolor |
a color for the sites |
sradius |
a radius for the sites, which are plotted as spheres (if
they are plotted); |
... |
arguments passed to |
Value
No value is returned.
Examples
library(sphereTessellation)
library(rgl)
# take the vertices of the cuboctahedron and Voronoïze
vertices <- t(cuboctahedron3d()$vb[-4L, ])
vor <- VoronoiOnSphere(vertices)
# plot
open3d(windowRect = 50 + c(0, 0, 512, 512), zoom = 0.8)
plotVoronoiOnSphere(vor, specular = "black", edges = TRUE)
# effect of the `bias` argument ###
library(sphereTessellation)
library(rgl)
vertices <- t(cuboctahedron3d()$vb[-4L, ])
vor <- VoronoiOnSphere(vertices)
open3d(windowRect = 50 + c(0, 0, 900, 300), zoom = 0.8)
mfrow3d(1, 3)
plotVoronoiOnSphere(vor, palette = "Viridis", bias = 0.5)
next3d()
plotVoronoiOnSphere(vor, palette = "Viridis", bias = 0.8)
next3d()
plotVoronoiOnSphere(vor, palette = "Viridis", bias = 1.1)