cylinder | R Documentation |
create a mesh representation of a cylinder
cylinder(
x,
dirs,
length,
radius = 1,
fine = 20,
addNormals = FALSE,
closelids = TRUE
)
x |
coordinates of center of the cylinders base - either a 3D-vector of a matrix of dim k x 3 |
dirs |
directions of the cylinder to point - either a 3D-vector of a matrix of dim k x 3 |
length |
length of the cylinder |
radius |
radius of the cylinder's base |
fine |
amount of vertices to create the base circle |
addNormals |
logical: if TRUE, normal vectors for each vertex are calculated. |
closelids |
logical: if TRUE, the end caps will be closed. |
a triangular mesh of class 'mesh3d'
cyl <- cylinder(1:3,1:3,4,addNormals = TRUE)
## Not run:
require(rgl)
wire3d(cyl)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.