Message Boards Message Boards

0
|
6265 Views
|
5 Replies
|
4 Total Likes
View groups...
Share
Share this post:

How do you find the cross section of a 3D DATA generated surface?

Posted 11 years ago
I have a large amount of computer generated (noise free) data in a .csv format in the form {x, y, z}. I can successfully plot the data using ListPlot3D but now my aim is to find the cross section of the graph at the point where for example z=50. The output should be a graph of x against y. I am aware you can achieve this using functions but I don’t know how to implement it using raw data.

This is what I found but how do you recreate it using raw data?
 http://demonstrations.wolfram.com/CrossSectionsOfGraphsOfFunctionsOfTwoVariables/
My aim is to then find the points of intersection that are created from two different surface cross sections, and to find the exact (x,y) co-ordinates of these points.
Any help would be appreciated thanks.
POSTED BY: John C
5 Replies
So we have z = f(x,y) for some function f.

Earlier, you considered cases where either x or y were some constant (let's call it c), and you were looking at the resulting equations like z = f(x,c). Here we can clearly say that z is related to x by some function. Similarly when we considered z = f(c,y) we can clearly say that z and y are related by a function. 

You are now asking about the case where f(x,y)=0. This is an implicit relationship. You aren't guranteed that there is a function directly relating x and y. And if it is exists, it's not obviously related to f like the previous cases. Is your function f a special case, like a linear function?

If it is an easy case, you can use Solve as follows:
Solve[f[x,y]==0,y]


Since you're working with a dataset rather than a function, you can just search for the points (x,y,z) where the z component is sufficiently close to 0. 

Here's an example:

exData = Flatten[#, 1] &@
  Table[{x, y, Sin[x + y]}, {x, 0, 6, 0.1}, {y, 0, 6, 0.1}];
nearZero = Select[exData, -0.1 < Last[#] < 0.1 &];

Of course, now all you have is a list of points. I'm not sure if that is useful for your purpose or not. It'd be hard to infer any curves from it. 

You could take advantage of the implicit function theorem and try to define a curve numerically (probably a spline). 

If you are only interested in getting a plot of f(x,y)==0, then you can use ContourPlot.
POSTED BY: Sean Clarke
I'm not exactly sure if I understand, but one solution that would  work for most purposes is to Interpolate your data.  Then the solution applicable to functions works for your data.
POSTED BY: Sean Clarke
Posted 11 years ago
Thanks you for your answer, that makes a lot of sense, I'l try.
POSTED BY: John C
I am not trying to answer the original question, instead I have an additional one: in the demonstration linked on the orginal Jonh´s post we can see the intersection of the surface with either planes parallel to  x-z and planes parallel to y-z. I am interested in the intersection of these surfaces with plane z=0. How can I find the equation of such an intersection in terms of y as function of x?


Looking forward.
Posted 11 years ago
I was interested in mainly solving my problem graphically and I ended up exporting a graph of the interpolated data into a 3D modelling program where I made a section cut. In response to Diego, If you already have a function can you not simply substitute z=0 and then plot the resulting graph?
POSTED BY: John C
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract