# wolfram mathematica intersection of two surfaces [duplicate]

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?

## marked as duplicate by Szabolcs, Sjoerd C. de Vries, Yves Klett, Michael E2, bobthechemistJun 25 '14 at 18:37

• Can you share your code so we have something to work with? – bobthechemist Jun 25 '14 at 17:34
• 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? – Szabolcs Jun 25 '14 at 17:34
• In general there is nothing to say, here is an example that demonstrates how difficult it can be Can mathematica solve this equation? – 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}]


• @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. – Szabolcs Jun 25 '14 at 18:41