Learn R Programming

SurfaceReconstruction (version 0.1.0)

PoissonReconstruction: Poisson surface reconstruction

Description

Poisson reconstruction of a surface, from a cloud of 3D points.

Usage

PoissonReconstruction(
  points,
  normals = NULL,
  spacing = NULL,
  sm_angle = 20,
  sm_radius = 30,
  sm_distance = 0.375
)

Value

A triangle mesh, of class mesh3d (ready for plotting with rgl).

Arguments

points

numeric matrix which stores the points, one point per row

normals

numeric matrix which stores the normals, one normal per row (it must have the same size as the points matrix); if you don't have normals, set normals=NULL (the default) and some normals will be computed with the help of vcgUpdateNormals, or use the getSomeNormals function

spacing

size parameter; smaller values increase the precision of the output mesh at the cost of higher computation time; set to NULL (the default) for a reasonable automatic value: an average spacing whose value will be displayed in a message and that you can also get in the "spacing" attribute of the output

sm_angle

bound for the minimum facet angle in degrees

sm_radius

relative bound for the radius of the surface Delaunay balls

sm_distance

relative bound for the center-center distances

Details

See Poisson Surface Reconstruction.

Examples

Run this code
library(SurfaceReconstruction)
library(rgl)

# Solid Möbius strip 
Psr_mesh <- PoissonReconstruction(SolidMobiusStrip)
shade3d(Psr_mesh, color= "yellow")
wire3d(Psr_mesh, color = "black")

# Hopf torus
Psr_mesh <- PoissonReconstruction(HopfTorus, spacing = 0.2)
shade3d(Psr_mesh, color= "darkorange")
wire3d(Psr_mesh, color = "black")

Run the code above in your browser using DataLab