# How can I extract the points from a ListSurfacePlot3D?

How can I get numerical output of ListSurfacePlot3D, i.e., a list of all the points, $(x,y,z)$ , used to construct the plot?

Thanks to your help I now have a list of (x,y,z). But the new mesh is irregular, I need z-values on specific (x,y). In more detail:

The original data (https://www.dropbox.com/s/q76qsrf8hl4li7g/6686.dat) is an array of 40 by 40, with

x = {0, 0.5, 1.0, ..., 19.5}

and the same for y.

Following user0501's suggestion the output is:

data = {{0., 8.73992, 14.8593}, {0., 8.38421, 15.075}, {0., 8.3125, 15.1281}, {0., 8.22328, 15.1943}, {0., 7.77126, 15.5292}, {0., 7.31923, 15.8642}, {0., 7.125, 16.0081},...}

How can I get the result based on the same regular grid as the grid based on the input data?

If you like, you can get the original data here:

data = Import["https://dl.dropbox.com/s/q76qsrf8hl4li7g/6686.dat"];
surf = ListSurfacePlot3D[data, MaxPlotPoints -> 5]


Again, thanks a lot for your help!!

Harald

Is this what you are looking for?

p = ListSurfacePlot3D[Flatten[
Table[{Cos[ϕ] Sin[θ], Sin[θ] Sin[ϕ], Cos[θ]}, {ϕ, -π, π, .2}, {θ, 0, π, .2}], 1]]
Graphics3D@Line@Cases[Normal[p], Line[x__] :> x, ∞]
Graphics3D@
Point@Flatten[Cases[Normal[p], Line[x__] :> x, ∞], 1]


Flatten[Cases[Normal[p], Line[x__] :> x, ∞], 1]


should give you the list of x,y,z.

• yes, this is exactly I was looking for. Thanks a lot, Harald Apr 19, 2013 at 20:05
• May I ask an additional question? Apr 21, 2013 at 10:19
• I'm not sure I understand your new question, but if you want to group the points, you can do something like SplitBy[data, {First, Part[#, 2] &}], if you want to sort, you can do something like SortBy[data, {First, Part[#, 2] &}]. Apr 21, 2013 at 14:24
• I need the z-values of Flatten[Cases[Normal[p], Line[x__] :> x, ∞],1] at grid-positions at (0, 0), (0, 0.5),...(0, 19.5), (0.5, 0), (0.5, 0.5), (0.5, 1),..., (19.5, 19.5). So I wonder wether it would be possible to extract the data at these positions. Again, thanks for your effort, Harald Apr 21, 2013 at 15:27
• Can you put your code which generate data into the question? Since it's a surface plot, I guess I don't think you have z values on every point of the grid. Apr 21, 2013 at 15:55