isotropicRemesh | R Documentation |
Isotropically remesh a mesh.
isotropicRemesh( vertices, faces, mesh = NULL, targetEdgeLength, iterations = 1, relaxSteps = 1, normals = FALSE )
vertices |
a numeric matrix with three columns |
faces |
either an integer matrix (each row provides the vertex indices of the corresponding face) or a list of integer vectors, each one providing the vertex indices of the corresponding face |
mesh |
if not |
targetEdgeLength |
positive number, the target edge length of the remeshed mesh |
iterations |
number of iterations, a positive integer |
relaxSteps |
number of relaxation steps, a positive integer |
normals |
Boolean, whether to compute the vertex normals of the output mesh |
A triangle mesh represented as the output of the
Mesh
function.
library(MeshesOperations) library(rgl) theta <- seq(0, 2*pi, length.out = 16) torus <- cylinder3d( cbind(cos(theta), sin(theta), 0), radius = 0.4, closed = TRUE ) mesh <- isotropicRemesh( mesh = torus, targetEdgeLength = 0.3, iterations = 3 ) rglmesh <- toRGL(mesh) open3d(windowRect = c(50, 50, 950, 500)) mfrow3d(1, 2) view3d(0, 0, zoom = 0.8) wire3d(torus) next3d() view3d(0, 0, zoom = 0.8) wire3d(rglmesh)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.