I have a set of scattered 3D points with coordinate (x,y,z) and an intensity associated with it.
I would like to do a smooth surface with the intensity being represented by the colour.
My points look like this
ListPointPlot3D[cup[[All, 1 ;; 3]]]
I can get the colour correctly by using (I found that on the net somewhere, cannot found it back ... sorry for not acknowledging the guy)
nf = Nearest[cup[[All, {1, 2, 3}]] -> Rescale[cup[[All, 4]]]]
colfun = ColorData["Rainbow"]@First@nf[{#1, #2, #3}] &
ListSurfacePlot3D[cup[[All, {1, 2, 3}]], MaxPlotPoints -> 30,
BoxRatios -> Automatic, ColorFunction -> colfun,
ColorFunctionScaling -> False, Mesh -> 5]
I tried playing around with the MaxPlotPoints but none give me satisfying results. The main issue is the fact that the top curve is not smooth although the data point are.
Finally I tried with ListPlot3D
ListPlot3D[cup[[All, {1, 2, 3}]], InterpolationOrder -> 15]
The problem there is that it incorrectly interpolate the extremum points, making a rectangle on the top whereas it should be curved.
Any idea how to proceed?
EDIT:
I also tried the idea of concave hull following this post Finding a Concave Hull
However this does not work either and give me
The data cup can be imported via cup = << "http://pastebin.com/raw/DRSCc4ir";
The full data (1.4Mb) can be imported via https://gist.githubusercontent.com/anonymous/327fed478fcf166c4403/raw/9f116770cf995f2232660061c202db7602b1836a/data.txt
Applying the solution provided by JasonB below I could merge my data to give:









cup? ${}$ – J. M.'s missing motivation Mar 13 '16 at 21:08cleanedcup = DeleteCases[cup, {x_, y_, z_, d_} /; z > 0.83];, and then using thiscleanedcupwherever you originally hadcup. For instance, theListSurfacePlot3Dapproach would produce this image. – MarcoB Mar 14 '16 at 01:11