torusMesh | R Documentation |
Triangle mesh of a torus.
torusMesh(R, r, nu = 50, nv = 30, rgl = TRUE)
R, r |
major and minor radii, positive numbers |
nu, nv |
numbers of subdivisions, integers (at least 3) |
rgl |
Boolean, whether to return a rgl mesh |
A triangle rgl mesh (class mesh3d
) if
rgl=TRUE
, otherwise a cgalMesh
list (vertices, faces,
and normals).
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.