MWE
Create and visualize the domain:
reg = Polygon[{{0, 0}, {Pi/3,Pi/Sqrt[3]}, {0, (4*Pi)/(3*Sqrt[3])}, {(-2*Pi)/3, (2*Pi)/(3*Sqrt[3])}, {(-2*Pi)/3, (-2*Pi)/(3*Sqrt[3])}, {0,(-4*Pi)/(3*Sqrt[3])}, {Pi/3, -(Pi/Sqrt[3])}, {0, 0}}];
DiscretizeRegion[reg]
Apply a function to each domain point and collect a dataset:
f[{x_, y_}] := Sin[x] Cos[y];
data = Table[Append[z, f[z]], {z, MeshCoordinates[DiscretizeRegion@reg]}];
Plot the result
ListPlot3D[data, ImageSize -> 500,BoxRatios -> {Automatic, Automatic, 2}, ViewPoint -> Top]
Problem
The problem is that Mathematica interpolates across the concave part of our domain and fills that space with plot for which there is no real data. I want to remove this and simply have a 3D list plot which ends at the boundaries of the domain Region
I defined. Can this be done?
{(2*Pi)/3, (-2*Pi)/(3*Sqrt[3])}
probably shouldn't be in your polygon. I don't believe deleting it solves your problem... $\endgroup$reg
to remove it. $\endgroup$