MathGroup Archive 2003

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: ListSurfacePlot3D options and Surface Integration suggestions

  • To: mathgroup at smc.vnet.net
  • Subject: [mg42297] Re: ListSurfacePlot3D options and Surface Integration suggestions
  • From: Paul Abbott <paul at physics.uwa.edu.au>
  • Date: Fri, 27 Jun 2003 06:31:24 -0400 (EDT)
  • Organization: The University of Western Australia
  • References: <bdbes1$2dk$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

In article <bdbes1$2dk$1 at smc.vnet.net>,
 Frank <fbrooks at solutionarchive.org> wrote:

> I am interested in why these surface plots appear as they do. One is
> as expected, the other I cannot seem to scale correctly. Please find
> them at:
> 
> http://www.solutionarchive.org/news/sa_news_index.shtml

It looks like the scaled surface is being clipped. A look at that 
original data might help.
>
> Also, assuming that I get a pretty surface plot, are there any
> suggestions as to how I could integrate an area under the surface as
> to find the contained volume? Ideally, I was hoping someone would have
> some code that works on the data points so there would be no need to
> attempt a NonlinearFit of the surface. 

Using Interpolation and NIntegrate will work. Here is some 3D data:

   data = Table[{x, y, x y Sin[x + y]}, {x,-3,5,0.5}, {y,-2,6,0.5}]; 

Apply ListPlot3D to the z-coordinate,

   ListPlot3D[data /. {x_, y_, z_} -> z]

or ListSurfacePlot3D,

   <<Graphics`

   ListSurfacePlot3D[data, Axes -> True, BoxRatios -> {5, 5, 3}]; 

Interpolate the data.

   int = Interpolation[Flatten[data, 1]]

Now we can plot it as a continuous function,

   Plot3D[int[x, y], {x, -3, 5}, {y, -2, 6}]

or integrate it to find the volume.

   NIntegrate[int[x, y], {x, -3, 5}, {y, -2, 6}]

Cheers,
Paul

-- 
Paul Abbott                                   Phone: +61 8 9380 2734
School of Physics, M013                         Fax: +61 8 9380 1014
The University of Western Australia      (CRICOS Provider No 00126G)         
35 Stirling Highway
Crawley WA 6009                      mailto:paul at physics.uwa.edu.au 
AUSTRALIA                            http://physics.uwa.edu.au/~paul


  • Prev by Date: RE: Derivative of a List
  • Next by Date: RE: Mesh in ListDensityPlot
  • Previous by thread: ListSurfacePlot3D options and Surface Integration suggestions
  • Next by thread: format Text in graphics