I have a surface given by z-values on an xy-grid (a 2D-array of values).
To calculate surface tension, I need to calculate mean curvature in every point.
To calculate mean curvature, I need to calculate principal curvature.
Since principal curvature lies in a plane containing the surface-normal-vector, this is where it gets tricky.
My current approach is very brute force:
- take a point and it's surrounding 8 points
- calculate gradient at central point
- rotate all points so that gradient is now in the xy-plane (moving all points off the grid!)
- calculate intersection of triangles defined by these 8 points and a sample of planes normal to the xy-plane
- find maximum
This is of course very cumbersome and slow. I'm furthermore not sure how many normal plains I should sample and weather there are special planes that give better estimates (e.g. planes containing the rotated points). Is there a more elegant way to do this?
This may be a duplicate: Numerical computation of surface curvature
However, that question didn't receive an answer.