Consider a large array(~42000,3):
This array forms a certain shape, it may contain cavities or other discontinuities. It can be translated periodically and some of these features can be removed from the area we are considering. Ideally I would like to used the discrete data and create a a function F[x,y,z] such that I can just take the gradient and obtain the normal vector as a function of x,y,z , but I dont think it is possible.
Therefore I need a way to do a discrete gradient. It would be good enough to be able to get every 3 nearby points make a plane and get the direction of the plane respect to the z axis, along with the coordinate. I have tried to make a ConvexHull and go from there but that only works in very simple shapes. Any thoughts or ideas will be appreciated? The link contains a .csv file of the data. https://drive.google.com/drive/folders/1ABNqdgGdmYek8TwGby3sPGKjcB2IrYuo?usp=sharing