How to define vertex gradient on a mesh

Anybody know how to define vertex gradient on a mesh?



You mean gradient taking vertex color into account or vertex position into account?

Again, if it is former then still it depends on the type of mesh you are planning to compute gradient.

If the mesh is regular it is simple
f’(x) = [f(x+1) - f(x-1)]/ 2*del(x)

but if the mesh is irregular or some other shape then it depends on the geometry of the underline mesh.

In that case you need to consider the curvilinear geometry for computing gradient.