I use wolfram mathematica. There is a function of two variables which defines the surface z = f(x,y), the second surface is defined as z = const. How to find the line of intersection of these two surfaces and its projection on XY plane?

  • 1
    $\begingroup$ Can you share your code so we have something to work with? $\endgroup$ Jun 25 '14 at 17:34
  • $\begingroup$ Have you tried googling for "mathematica intersection of surfaces"? Have you tried the method in the first google hit? If yes, what kinds of difficulties did you encounter, or in what way was the solution not sufficient? $\endgroup$
    – Szabolcs
    Jun 25 '14 at 17:34
  • 1
    $\begingroup$ In general there is nothing to say, here is an example that demonstrates how difficult it can be Can mathematica solve this equation? $\endgroup$
    – Artes
    Jun 25 '14 at 17:52

Let f[x_,y_] := Sin[x + y^2].

To plot the intersection of f[x,y] == z with z == 0.5, use

Plot3D[f[x, y], {x, -3, 3}, {y, -2, 2}, MeshFunctions -> Function[{x, y, z}, z], Mesh -> {{0.5}}]

To plot this curve in the plane,

ContourPlot[f[x, y] == 0.5, {x, -3, 3}, {y, -2, 2}]

Further reading:

  • $\begingroup$ Thanks for quick reply! I can draw 3d graph and see the line of intersection, but how get(extract) the projection on the xy plane in the numerical data (as a function f(x) or FunctionInterpolate(data))? My function f(x, y) is not analytical, its value is calculated numerically. $\endgroup$
    – rdm
    Jun 25 '14 at 17:48
  • $\begingroup$ @rdm I do not understand the question completely. Please edit the question and post a sample input (f function to work with) and give an example of what sort of output you need (or what you want to do with an output). If people would only post a clear enough question the first time, it would save a lot of time for everyone. $\endgroup$
    – Szabolcs
    Jun 25 '14 at 18:41

Not the answer you're looking for? Browse other questions tagged or ask your own question.