Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
1993
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1993

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

Search the Archive

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







  • Prev by Date: Mathematica Question
  • Next by Date: Indexing Output Files
  • Previous by thread: 3D Plots of data in arrays?
  • Next by thread: BNF form for MMA?