DelaunayOnSphere {sphereTessellation}R Documentation

Spherical Delaunay triangulation

Description

Computes a spherical Delaunay triangulation.

Usage

DelaunayOnSphere(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

See 2D Triangulations on the Sphere.

Value

A named list with four fields:

See Also

plotDelaunayOnSphere

Examples

library(sphereTessellation)
library(rgl)

if(require(cooltools)) {
vertices <- fibonaccisphere(30L)
del <- DelaunayOnSphere(vertices)
open3d(windowRect = 50 + c(0, 0, 512, 512), zoom = 0.8)
plotDelaunayOnSphere(del)
}

if(require(uniformly)) {
# sample vertices on a hemisphere, so there will be some ghost faces
set.seed(421L)
vertices <- rphong_on_hemisphere(6L)
del <- DelaunayOnSphere(vertices)
# the ghost faces are not plotted
open3d(windowRect = 50 + c(0, 0, 512, 512), zoom = 0.8)
plotDelaunayOnSphere(del)
}

[Package sphereTessellation version 1.2.0 Index]