View source: R/displacementField.r
applyDisplacementField | R Documentation |
apply a discrete displacement field to a set of points/mesh in its domain by applying the gaussian smoothed interpolation based of k closest neighbours
applyDisplacementField(
dispfield,
points,
k = 10,
sigma = 20,
type = c("Gauss", "Laplace", "Exponential", "TPS"),
gamma = 1,
lambda = 1e-08,
threads = 1
)
dispfield |
displacement field of class "DisplacementField", e.g. created using |
points |
matrix or mesh3d at which to evaluate the interpolated displacement field |
k |
integer: number of k closest points to evaluate. |
sigma |
kernel bandwidth used for smoothing. For all kernels except B-spline, sigma controls the importance of the neighbourhood by defining the bandwidth of the smoothing kernel. For B-spline it defines the support (the higher, the "wobblier" the deformation field can become. |
type |
kernel function for smoothing are "Gauss","Laplace", "Exponential" and "Bspline" (or any abbreviation thereof). |
gamma |
dampening factor (displacement vectors will be divided by |
lambda |
smoothing factor for TP |
threads |
integer: number of threads to use for computing the interpolation. |
returns the displaced version of points
if points is identical to the domain of the displacement field, no interpolation will be performed.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.