1
$\begingroup$

Mathematica function ListPlot3D plots only half portion of a closed surface. It appears to ignore multiple values of z for same value of {x,y}. What is the significance of this limitation that leads to define ListSurfacePlot.

$\endgroup$
  • 4
    $\begingroup$ I'm sorry, I'm not quite sure what is the question here. $\endgroup$ – Kuba Jul 18 '17 at 8:34
1
$\begingroup$

The difference between ListPlot3D and ListSurfacePlot3D is in the way they interpolate the data they are given. As you have found, ListPlot3D ignores the 2nd point if two data points give for one domain {x, y} value.

Example

SeedRandom[42];
xyzDataTop = RandomInteger[10, {20, 3}];
xyzDataBtm = xyzDataTop; 
xyzDataBtm[[All, 3]] = -xyzDataTop[[All, 3]];

This plot ignore the bottom data.

ListPlot3D[Join[xyzDataTop, xyzDataBtm], BoxRatios -> {1, 1, 1}]

top_plot

And this one the bottom data.

ListPlot3D[Join[xyzDataBtm, xyzDataTop], BoxRatios -> {1, 1, 1}]

btm_plot

However, because ListPlot3D is designed to plot vectors of data sets, you can make use of that to fix the problem.

ListPlot3D[{xyzDataTop, xyzDataBtm},
  PlotStyle -> {RGBColor[1., .7, 0.]},
  BoxRatios -> {1, 1, 1}]

both_plot

ListSurfacePlot3D gives a quite different interpolating surface.

ListSurfacePlot3D[Join[xyzDataTop, xyzDataBtm],
  MaxPlotPoints -> ∞,
  BoxRatios -> {1, 1, 1}]

surface

$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.