Does anyone knows and algorithm or code for triangulating a non-planar surface into triangles. I am trying to solve MoM for electromagnetic scattering but cannot find a good scheme other than delaunay of MATLAB but it does not work on nonplanar surfaces.