VoronoiOnSphere: Spherical Voronoï tessellation

View source: R/voronoi.R

VoronoiOnSphereR Documentation

Spherical Voronoï tessellation

Description

Computes a spherical Voronoï tessellation.

Usage

VoronoiOnSphere(vertices, radius = 1, center = c(0, 0, 0), iterations = 5L)

Arguments

vertices

vertices, a numeric matrix with three columns

radius

radius of the sphere, a positive number; the vertices will be projected on this sphere

center

center of the sphere, a numeric vector of length three; the vertices will be projected on this sphere

iterations

positive integer, the number of iterations used to construct the meshes of the spherical faces

Details

First the Delaunay triangulation is computed, then the Voronoï tessellation is obtained by duality.

Value

An unnamed list whose each element corresponds to a Voronoï face and is a named list with three fields:

  • site, the coordinates of the Voronoï site of the face;

  • cell, a numeric matrix providing the coordinates of the vertices of the face;

  • mesh, a mesh of the face used for plotting in the function plotVoronoiOnSphere.

See Also

plotVoronoiOnSphere

Examples

library(sphereTessellation)
library(rgl)
if(require(cooltools)) {
vertices <- fibonaccisphere(150L)
vor <- VoronoiOnSphere(vertices)
open3d(windowRect = 50 + c(0, 0, 512, 512), zoom = 0.8)
plotVoronoiOnSphere(vor, colors = "random")
}

sphereTessellation documentation built on July 9, 2023, 6:04 p.m.