# Discrete gradient on point clouds

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?

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$.