Minimal surface [Python]

Question:

I have a set of 3D points defining a 3D contour. What I want to do is to obtain the minimal surface representation corresponding to this contour (see Minimal Surfaces in Wikipedia). Basically this requires to solve a nonlinear partial differential equation.

In Matlab this is almost straightforward using the pdenonlinfunction (see Matlab’s documentation). An example of its usage for solving a minimal surface problem can be found here: Minimal Surface Problem on the Unit Disk.

I need to make such an implementation in Python, but up to know I haven’t found any web resources on how to to this.

Can anyone point me any resources/examples of such implementation?

Asked By: sixtokallin

||

Answers:

you can try use this code:

GRID_POINTS = 25
x_min = XYZ[:,0].min()
x_max = XYZ[:,0].max()
y_min = XYZ[:,1].min()
y_max = XYZ[:,1].max()
xi = np.linspace(x_min, x_max, GRID_POINTS)
yi = np.linspace(y_min, y_max, GRID_POINTS)
XI, YI = np.meshgrid(xi, yi)

from scipy.interpolate import Rbf
rbf = Rbf(XYZ[:,0],XYZ[:,1],XYZ[:,2],function='thin-plate',smooth=0.0)
ZI = rbf(XI,YI)
Answered By: dxDark

also, change values to yours:

x_min = XYZ[:,0].min()
x_max = XYZ[:,0].max()
y_min = XYZ[:,1].min()
y_max = XYZ[:,1].max()
Answered By: dxDark
Categories: questions Tags:
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.