How do I generate a surface plot of irregularly spaced data?
 Here is a data set in which the x and y points are not evenly spaced. In[1]:= |  |
The standard package DiscreteMath`ComputationalGeometry` has a function TriangularSurfacePlot that can generate a surface from these points. In[2]:= |  |
In[3]:= |  |
In[4]:= |  |
 Out[4]= |
 |
Note that the mathematics behind this type of calculation is quite intensive. For large data sets, TriangularSurfacePlot will be slow. The function ListSurfacePlot3D, as described in the ExtendGraphics package, will allow you to generate a surface plot from irregularly spaced data. More information about this package is available at the following web page. http://support.wolfram.com/applicationpacks/unsupported/extend/ It runs much faster because the actual triangulation is done by an external MathLink function. Here is an example of the ListSurfacePlot3D function. You must first load the package. In[5]:= |  |
Then you must define some data points. This set is much more complicated that our original set. In[6]:= |  |
Here is the plot of the surface. In[7]:= |  |
 Out[7]= |
 |
Download this FAQ as a Mathematica 5.2 Notebook
Questions or comments? Send email to support@wolfram.com.
|