# Mesh for points in 3D

I've got a set of Eisenstein integers (triangle lattice points in the complex plane), and I've selected them to be above a line, so that they form a triangle:

I then took these 2D points and embedded them in 3D space, with the z-axis chosen randomly:

points3d = Map[{#[[1]], #[[2]], RandomReal[]} &, eisensteinIntegers]
Graphics3D[Point /@ points3d, Boxed -> False]


I would like to have those points form a triangular mesh, similiar to the Delaunay mesh for the eisenstein integers:

Except that the Delaunay mesh on the 3D points forms a solid, not a surface. How can I form a mesh surface from these points?

• It helps posting working code. Retyping code and thinking about how to get einsteinIntegers takes to long for me to consider answering. Use MeshCoordinates and Join a 3rd coordinate and then with MeshCells extract the faces. – user21 Sep 12 '14 at 8:00

## 1 Answer

This is morally like ListPlot3D[], but that does the wrong thing. To do the right thing, do the following:

instantiatePoly[p_, ptlist_] := Map[ptlist[[#]] &, p]

drawFunc[planar_, vals_] :=
Module[{triples = MapThread[Append, {planar, vals}]},
Graphics3D[
Map[instantiatePoly[#, triples] &,
MeshCells[DelaunayMesh[planar], 2]]]]


Now, if planar is your set of points in the plane, and vals is the list of values at those points (should obviously be the same length), you will get what you want, like so (for a different subset of Eisenstein integers). Of course, you can customize this up the wazoo if you are so inclined.