# Interpolate discrete points to create a 3D surface and highlight points

I have some discrete points in 3D: https://www.dropbox.com/s/syl7w3s30tc30b9/amycoo.xlsx?dl=0

I have the following problem:

1. I want to create a 3D surface from those points and need to somehow interpolate the "outer" points.

2. I want to make this shape/surface a bit transparent and highlight some points on or in the interior of it, e.g. an arrow pointing at that point with a text label showing a value.

To make this more clear: Let's say the points describe a brain area and I want to create a continuous version of the shape of this area, but also highlight specific points which represent the result of some data analysis, i.e. select the first point which has a value of 10.

ListPointPlot3D was a first start, but then I get stuck and hope for some guidance.

Thanks!

• Is something like ConvexHullMesh what you're looking for w.r.t. #1? – N.J.Evans Mar 29 '17 at 13:48
• Maybe look into ListSurfacePlot3D[] as well... – J. M.'s torpor Mar 29 '17 at 14:05

Here's a simple example:

(*This is just me getting your data into an array of triples since I copy-pasted it.*)

data = ToExpression /@
Partition[StringSplit[a, WhitespaceCharacter], 3];

(*now data looks like {{x,y,z},{x,y,z},...}*)


You can use Show with ConvexHullMesh and Graphics3D for annotation, and HighlightMesh to change the style. I just plotted a point at the centroid and put an arrow pointing to that spot as an example:

hull = ConvexHullMesh@data;
Show[
HighlightMesh[hull, Style[2, Opacity[0.5]]],
Graphics3D[{
Red,
Point[RegionCentroid@hull],
Arrow[{# + {5, 5, 5}, #}] &@(RegionCentroid@hull)
}]
]


Which produces the following:

• Wow! Thanks, thats exactly what I wanted! Two follow-up questions though: 1. How can I add a text at the beginning of the arrow? 2. Can I somehow get a list of the points that only lie on the outer surface? – holistic Mar 29 '17 at 14:57
• MeshCoordinates@hull will give you the coordinates of the vertices, and you can use Graphics3D[{Text["label",{x,y,z}],Arrow[...]...}]. That will be fairly basic, if you want something nicer, I'd suggest searching the site for info about annotating Graphics3D I'm pretty certain that's been discussed before. – N.J.Evans Mar 29 '17 at 16:12
• Great, thanks again! – holistic Mar 29 '17 at 16:13