Reconstruct a surface from an oriented point cloud (Poisson)
Source:R/poisson_recon.R
poisson_reconstruction.RdReconstructs a closed triangulated surface from an oriented point cloud using
CGAL's Poisson surface reconstruction algorithm. The input point cloud must
carry estimated normals (e.g., from pca_estimate_normals()).
Usage
poisson_reconstruction(
mesh,
min_angle = 20,
max_size = 2,
distance = 0.375,
gen_normals = TRUE
)Arguments
- mesh
A
mesh3dobject representing a point cloud. Must contain a$normalsfield (3×N matrix) produced bypca_estimate_normals().- min_angle
Minimum triangle angle in the output mesh (degrees). Default
20.- max_size
Maximum triangle size relative to the average point spacing. Default
2.- distance
Maximum distance from the reconstructed surface to the input points, relative to average spacing. Default
0.375.- gen_normals
Whether to generate normals on the output surface. Default
TRUE.
Examples
# \donttest{
f <- system.file("extdata", "torus.stl", package = "vespa")
mesh <- read_stl(f)
cloud <- mesh; cloud$it <- matrix(integer(0), 3L, 0L)
cloud_n <- pca_estimate_normals(cloud)
result <- poisson_reconstruction(cloud_n)
# }