powered by
Mesh of a surface of revolution. The axis of revolution is the z-axis.
revolutionMesh(x, y, n = 100)
A rgl triangle mesh (class mesh3d).
mesh3d
two numeric vectors of the same length defining the section to be revoluted
integer, the number of subdivisions used to construct the mesh
library(cgalMeshes) library(rgl) t <- seq(0, 2*pi, length.out = 90) x <- 4 + cos(t)/2 y <- sin(t) rmesh <- revolutionMesh(x, y, n = 120) rmesh <- addNormals(rmesh) shade3d(rmesh, color = "red")
Run the code above in your browser using DataLab