Learn R Programming

sphereTessellation (version 1.2.0)

icosphereMesh: Icosphere

Description

Returns the mesh of an icosphere.

Usage

icosphereMesh(x = 0, y = 0, z = 0, r = 1, iterations = 3L)

Value

A rgl mesh (class mesh3d).

Arguments

x, y, z

coordinates of the center

r

radius

iterations

number of iterations (the icosphere is obtained by iteratively subdividing the faces of an icosahedron)

Examples

Run this code
library(sphereTessellation)
library(rgl)
mesh <- icosphereMesh()
open3d(windowRect = 50 + c(0, 0, 512, 512))
shade3d(mesh, color = "navy")

Run the code above in your browser using DataLab