Learn R Programming

cgalMeshes (version 2.2.0)

cyclideMesh: Cyclide mesh

Description

Triangle mesh of a Dupin cyclide.

Usage

cyclideMesh(a, c, mu, nu = 90L, nv = 40L)

Value

A triangle rgl mesh (class mesh3d).

Arguments

a, c, mu

cyclide parameters, positive numbers such that c < mu < a

nu, nv

numbers of subdivisions, integers (at least 3)

Details

The Dupin cyclide in the plane z=0:

cyclide

Examples

Run this code
library(cgalMeshes)
library(rgl)
mesh <- cyclideMesh(a = 97, c = 32, mu = 57)
sphere <- sphereMesh(x = 32, y = 0, z = 0, r = 40)
open3d(windowRect = 50 + c(0, 0, 512, 512))
view3d(0, 0, zoom = 0.75)
shade3d(mesh, color = "chartreuse")
wire3d(mesh)
shade3d(sphere, color = "red")
wire3d(sphere)

Run the code above in your browser using DataLab