Author 
Comment/Response 
Forum Moderator
email me

10/31/00 07:43am
>Hello. I just got this program. Seems complicated to me, but I'm sure it will pay off once I get the hang of it. I'm trying to command mathematica to plot a 3d surface area graph with x, y, and z coordinates for a project. I don't know the commands, and I'm still trying to learn how to use this program. Would somebody please help me and tell me how to do this. The graph has 26 points for each axis. I'm also using it as a study aid for my precalculus class. Any advice or hints and tips to make learning mathematica easier (it's almost like programming:). Thanks. See ya.
================
Much will depend on whether your list is regular or irregular. I am not sure what you mean by ''26 points for each axis'', so here is an example to get started.
Suppose you have a list consisting of ordered triples {x, y, f(x, y)}. Consider the following list of points (x, y, Sin[x] Cos[y] :
xyList =
{{0, 0, 0}, {0, 1, 0}, {0, 2, 0}, {0, 3, 0},
{1,0,0.841471},{1,1,0.454649},{1,2,0.350175},{1,3,0.83305},
{2,0,0.909297},{2,1,0.491295},{2,2,0.378401},{2,3,0.900198},
{3,0,0.14112},{3,1,0.0762475},{3,2,0.0587266},{3,3,0.139708}};
This is nice and orderly. With this list we can use the function
ListSurfacePlot3D from the package Graphics`Graphics3D`. The only
requirement is that our list be subdivided into lists of points with the same
x coordinates as follows:
xyListDiv = Partition[xyList, 4]
(*There are four yvalues for each xvalue*)
{{{0, 0, 0}, {0, 1, 0}, {0, 2, 0}, {0, 3, 0}},
{{1, 0, 0.841471}, {1, 1, 0.454649}, {1, 2, 0.350175},
{1, 3, 0.83305}}, {{2, 0, 0.909297}, {2, 1, 0.491295},
{2, 2, 0.378401}, {2, 3, 0.900198}},
{{3, 0, 0.14112}, {3, 1, 0.0762475}, {3, 2, 0.0587266},
{3, 3, 0.139708}}}
Now load the package:
Needs[''Graphics`Graphics3D`'']
Then plot the list using ListSurfacePlot3D.
ListSurfacePlot3D[xyListDiv]
You should not infer that a rectangular grid is necessary for
ListSurfacePlot3D. The x and y coordinates need only form a regular mesh.
In the example below the x and y coordinates form a regular, nonrectangular
mesh.
meshList = Table [{Cos[t] Cos[u], Sin[t] Cos[u], Sin[u]},
{t, 0, Pi, Pi/5}, {u, 0, Pi/2, Pi/10}];
ListSurfacePlot3D[meshList]
If your data is not on a regular grid, see:
http://support.wolfram.com/Graphics/ThreeD/SurfaceIrregular.html
Tom Zeller
Forum Moderator
URL: , 
