# Numerically calculating the divergence of a set of oriented points

Say I have a set of oriented points at locations $\vec{v_i}$ with each some direction $\vec{n_i}$, in practice they represent the normals of some surface that has been non uniformly sampled. How would I calculate the divergence of this vector field? Standard finite-difference methods would obviously not work because there is no grid.

Can I perhaps assume a grid and use nearest neighbours to infer the vector field at each point (I think it's called "splatting")? The discretized vector field would then have at each point a weighted average of nearby points. This would then allow me to use standard FD-methods to calculate (or rather estimate) the divergence at each gridpoint. Is this a common method, or are there better methods?

Edit: Asked it on MO, got an answer.

• Your question is underspecified: (i) How exactly is the surface defined? You only say that the given points are on this surface, but how is it defined between the points? (ii) What exactly do you mean by "divergence"? The surface divergence? Nov 28, 2015 at 19:25
• The surface doesn't matter really, just a set of points in space with each point defining some direction. Elsewhere it is assumed that the vector field is zero. An example would be meteorological data about wind speed and direction: measuring stations will be placed rather sparsely but you still want to be able to calculate the divergence everywhere based on those few points. What I mean by divergence is just the usual vector field divergence, but in this case the vector field has not been sampled uniformly. Nov 28, 2015 at 20:22
• You can also assume that the field varies somewhat continuous. For more info as to why I need to calculate this, see here (first equation) Nov 28, 2015 at 20:36
• But your description doesn't make sense. If the vector field is zero except at individual points, them the divergence is zero almost everywhere and singular at your measurement points. You need to consider the field to be continuous in some sense for the divergence to make sense. My question is how exactly you extend the vector field from individual points to the entire space. Nov 29, 2015 at 21:39
• The paper refers to some smoothing filter on page two ("Defining the gradient field"). I think this assures some form of continuity so the divergence is not unbounded. Nov 29, 2015 at 23:41