# Minimal surface solution in Python

Note: this question was also posted in StackOverflow and math.stackexchange.

I have a set of 3D points defining a 3D contour, as shown below. The points in this contour lie in their best-fit plane and I want to obtain a 3D triangular mesh representation of the surface inside this contour.

Doing some research I found that this is basically a minimal surface problem and its solution is related with the Biharmonic Equation. I also found that the Thin-plate spline is the fundamental solution to this equation.

So I think the approach would be to try to fit this sparse representation of the surface (given by the 3D contour of points) using thin-plate splines. I found this example in scipy.interpolate where scattered data (x,y,z format) is interpolated using thin-plate splines to obtain the ZI coordinates on a uniform grid (XI,YI).

Two questions arise: (1) Would thin-plate spline interpolation be the correct approach for the problem of computing the surface from the set of 3D contour points? (2) If so, how to perform thin-plate interpolation on scipy with a NON-UNIFORM grid?

Thanks! Miguel

• All you have is this boundary? – J. M. May 19 '13 at 12:56
• @J.M. Yes, all I have is this set of points defining the boundary. – CodificandoBits May 19 '13 at 12:57
• Is there a reason you want the minimal surface equation solution as opposed to some other one? There are infinitely many surfaces that you can create that have this curve as their boundary. – Bill Barth May 19 '13 at 13:50
• @Bill Barth: for my application the 3D contour/surface represent a surface area along which a fluid passes. I'm interested in estimating the minimum area of such a surface so as to estimate the flow. – CodificandoBits May 19 '13 at 14:25
• I would add that to the description of the question. – Bill Barth May 19 '13 at 14:47

Also, it's been awhile, but I usually associate the following equation with minimal surfaces (for small displacements, at least): $$(1+u_x^2)u_{yy} - 2u_x u_y u_{xy} + (1+u_y^2)u_{xx} = 0$$ where $u(x,y)$ is the small displacement of the surface in question.
You could solve this by projecting your boundary points down into the $(x,y)$-plane and using their $z$ value as $u(x,y)$ on the boundary. Using the $(x,y)$ coordinates of the boundary points as the boundary of your domain, you could create a triangular mesh on the interior and then solve the above equation with above boundary conditions.