calcDensity edit page

calculate a density function out of (weighted) unit vectors


sF = calcDensity(v)
sF = calcDensity(v,'weights',w)
sF = calcDensity(v,'halfwidth',delta)
sF = calcDensity(v,'kernel',psi)
 f = calcDensity(v,S2G)


v sampling points for density estimation vector3d
S2G vector3d
w weights, default is all one
delta halfwidth of the kernel, default is 10 degree
psi S2Kernel function, default is S2 de la Vallee Poussin


sF S2Fun
f function values


halfwidth halfwidth of a kernel
kernel specify a S2Kernel
weights vector of weights, with same length as v