powered by
Triangle mesh of a torus.
torusMesh(R, r, nu = 50, nv = 30, rgl = TRUE)
A triangle rgl mesh (class mesh3d) if
mesh3d
rgl=TRUE, otherwise a cgalMesh list (vertices, faces, and normals).
rgl=TRUE
cgalMesh
major and minor radii, positive numbers
numbers of subdivisions, integers (at least 3)
Boolean, whether to return a rgl mesh
library(MeshesOperations) library(rgl) mesh <- torusMesh(R = 3, r = 1) open3d(windowRect = c(50, 50, 562, 562)) view3d(0, 0, zoom = 0.75) shade3d(mesh, color = "green") wire3d(mesh)
Run the code above in your browser using DataLab