I am interested to know some ways to approximate discrete gradient if you have a function on point clouds in 2D or 3D.

If you have a function defined on a grid, it well known that you can use a standard difference formula to compute the partial derivative in each direction.

I came across a paper by Luo et al entitled Approximating Gradients for Meshes and Point Clouds via Diffusion Metric which uses diffusion metric. Another idea that came into mind is to defined a smoothed field using a specific kernel, then to take the gradient of the smoothed function.

Is there a standard way of doing this?

Very many numerical methods for partial differential equations compute derivatives from values on something that is not a regular grid (they use unstructured grids). Usually these are finite element methods and they use more than just point values (they have various local integrals of the function available).

A class of methods based on what you're asking for are the so-called meshfree methods. Typically, they use the point values to generate a continuous approximation by convolving with some smooth kernel (e.g., a Gaussian). Then they compute derivatives of the continuous function. Of course, if you have a lot of points this becomes expensive and there are lots of additional tricks you can play (e.g., using a kernel with compact support; employing the fast multipole method, etc.).

Certainly, there is not a standard method - and be aware that the calculation will be sensitive to noise.

A straightforward of calculating the gradient would be: Take some point $x$ and choose a numbers of neigbors (the nearest $k$, say). Now fit a hyperplane through the $k+1$ points (e.g. by a least squares fit) and take the slope of this plane as the gradient in $x$.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.