Re: 3D Plots of data in arrays?
- To: mathgroup at yoda.physics.unc.edu
- Subject: Re: 3D Plots of data in arrays?
- From: twj
- Date: Mon, 28 Jun 93 12:54:37 CDT
Eric S. Boltz writes...
>I have some data, generated outside of Mma, that I would like to plot
>in Mma (2.1/NeXT). I can read the data in just fine as (x,y,z) groups.
>The problem is that ListPlot3D interprets this as a list of heights and Plot3D
>won't deal with lists.
>
>In Mma 1.2 I could do this using ParametricPlot3D where the parameters indexed
>an array - no more in 2.1.
There is a funciton ListSurfacePlot3D which is defined in the package
Graphics`Graphics3D` which is the list plotting equivalent of
ParametricPlot3D. You can use it thus...
data = Table[ {Sin[z] Sin[t], Sin[z] Cos[t], z}, {z,-Pi,Pi,Pi/5}, {t,0,2Pi,Pi/5}];
ListSurfacePlot3D[ data]
Thus ListSurfacePlot3D takes a matrix of points in 3D space. If the matrix
is of the form {{p11, p12, p13, ...}, {p21, p22, p23, ...}, ...} then the
surface {Polygon[ {p11, p12, p22, p21}], Polygon[ {p12, p12, p23, p22}],..
will be formed. Note that each point must be a list of three numbers.
Thus if you can arrange your data in this form you will be able
to generate your surface.
Tom Wickham-Jones
WRI