getSomeNormals: Normals for a points could

View source: R/normals.R

getSomeNormalsR Documentation

Normals for a points could

Description

Returns a function which computes some normals for a 3D points cloud.

Usage

getSomeNormals(nbNeighbors, method = "pca")

Arguments

nbNeighbors

integer, number of neighbors used to compute the normals

method

one of "pca" or "jet"

Value

A function which takes just one argument: a numeric matrix with three columns, each row represents a point, and the function returns a matrix of the same size as the input matrix, whose each row gives one unit normal for each point.

Note

The getSomeNormals function is intended to be used in the PoissonReconstruction function. If you want to use it for another purpose, be careful because the function it returns does not check the matrix it takes as argument.

Examples

library(SurfaceReconstruction)
library(rgl)
psr <- PoissonReconstruction(ICN5D_eight, getSomeNormals(6))
open3d()
shade3d(psr, color = "cyan")
wire3d(psr)

stla/SurfaceReconstruction documentation built on July 23, 2022, 12:06 p.m.