plotEdges | R Documentation |
Plot the given edges with rgl.
plotEdges( vertices, edges, color = "black", lwd = 2, edgesAsTubes = TRUE, tubesRadius = 0.03, verticesAsSpheres = TRUE, only = NULL, spheresRadius = 0.05, spheresColor = color )
vertices |
a three-columns matrix giving the coordinates of the vertices |
edges |
a two-columns integer matrix giving the edges by pairs of vertex indices |
color |
a color for the edges |
lwd |
line width, a positive number, ignored if |
edgesAsTubes |
Boolean, whether to draw the edges as tubes |
tubesRadius |
the radius of the tubes when |
verticesAsSpheres |
Boolean, whether to draw the vertices as spheres |
only |
integer vector made of the indices of the vertices you want
to plot (as spheres), or |
spheresRadius |
the radius of the spheres when
|
spheresColor |
the color of the spheres when
|
No value.
library(MeshesOperations) library(rgl) mesh <- Mesh( mesh = truncatedIcosahedron, triangulate = TRUE, normals = FALSE, numbersType = "lazyExact" ) # now we can plot the truncated icosahedron tmesh <- toRGL(mesh) open3d(windowRect = c(50, 50, 562, 562), zoom = 0.9) shade3d(tmesh, color = "gold") plotEdges(mesh[["vertices"]], mesh[["edges0"]], color = "navy")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.