Get the minimal surface solution of a 3D contour

You can use FEniCS: from fenics import ( UnitSquareMesh, FunctionSpace, Expression, interpolate, assemble, sqrt, inner, grad, dx, TrialFunction, TestFunction, Function, solve, DirichletBC, DomainBoundary, MPI, XDMFFile, ) # Create mesh and define function space mesh = UnitSquareMesh(100, 100) V = FunctionSpace(mesh, “Lagrange”, 2) # initial guess (its boundary values specify the Dirichlet boundary conditions) # (larger … Read more

procedurally generate a sphere mesh

If there are M lines of latitude (horizontal) and N lines of longitude (vertical), then put dots at (x, y, z) = (sin(Pi * m/M) cos(2Pi * n/N), sin(Pi * m/M) sin(2Pi * n/N), cos(Pi * m/M)) for each m in { 0, …, M } and n in { 0, …, N-1 } and … Read more

Display wireframe and solid color

To render both a model and its wireframe, you can use a pattern like this one: // mesh var material = new THREE.MeshPhongMaterial( { color: 0xff0000, polygonOffset: true, polygonOffsetFactor: 1, // positive value pushes polygon further away polygonOffsetUnits: 1 } ); var mesh = new THREE.Mesh( geometry, material ); scene.add( mesh ) // wireframe var … Read more