Learn R Programming

cgalMeshes (version 2.2.0)

HopfTorusMesh: Hopf torus mesh

Description

Triangle mesh of a Hopf torus.

Usage

HopfTorusMesh(nlobes = 3, A = 0.44, alpha = NULL, nu, nv)

Value

A triangle rgl mesh (class mesh3d).

Arguments

nlobes

number of lobes of the Hopf torus, a positive integr

A

parameter of the Hopf torus, number strictly between 0 and pi/2

alpha

if not NULL, this is the exponent of a modified stereographic projection, a positive number; otherwise the ordinary stereographic projection is used

nu, nv

numbers of subdivisions, integers (at least 3)

Examples

Run this code
library(cgalMeshes)
library(rgl)
mesh <- HopfTorusMesh(nu = 90, nv = 90)
open3d(windowRect = 50 + c(0, 0, 512, 512))
view3d(0, 0, zoom = 0.75)
shade3d(mesh, color = "forestgreen")
wire3d(mesh)
mesh <- HopfTorusMesh(nu = 90, nv = 90, alpha = 1.5)
open3d(windowRect = 50 + c(0, 0, 512, 512))
view3d(0, 0, zoom = 0.75)
shade3d(mesh, color = "yellowgreen")
wire3d(mesh)

Run the code above in your browser using DataLab