HopfTorusMesh: Hopf torus mesh

View source: R/someMeshes.R

HopfTorusMeshR Documentation

Hopf torus mesh

Description

Triangle mesh of a Hopf torus.

Usage

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

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)

rgl

Boolean, whether to return a rgl mesh

Value

A triangle rgl mesh (class mesh3d) if rgl=TRUE, otherwise a cgalMesh list (vertices, faces, and normals).

Examples

library(MeshesOperations)
library(rgl)
mesh <- HopfTorusMesh(nu = 90, nv = 90)
open3d(windowRect = c(50, 50, 562, 562))
view3d(0, 0, zoom = 0.75)
shade3d(mesh, color = "forestgreen")
wire3d(mesh)
mesh <- HopfTorusMesh(nu = 90, nv = 90, alpha = 1.5)
open3d(windowRect = c(50, 50, 562, 562))
view3d(0, 0, zoom = 0.75)
shade3d(mesh, color = "yellowgreen")
wire3d(mesh)

stla/MeshesOperations documentation built on Oct. 23, 2022, 8:23 a.m.