How do you plot level curves describing a 3d surface on the x-y plane?

I am trying to plot several level curves of the cone: [x=ucos[v], y=usin[v], z=u],[0<=u<=2,0<=v<=2Pi] in the x-y plane. Does anyone know how to do this? Thanks

• The level curves are circles with radius z. All we have to know is how to plot a circle, which can be done in lots of simple ways. – C. E. Nov 12 '13 at 5:01

EDIT Correcting the mmismatch related to Frame and padding pointed out by Markus Roellig

Using Cartesian parametrization and upper cone:

ContourPlot[x^2 + y^2, {x, -5, 5}, {y, -5, 5},
ContourShading -> False, Contours -> {4, 9, 16, 25},
ContourLabels -> (Text[Style[Sqrt[#3],20],{#1, #2}] &)] Using MeshFunctions:

Plot3D[Sqrt[x^2 + y^2], {x, -5, 5}, {y, -5, 5},
MeshFunctions -> (#3 &), Mesh -> {Table[{j}, {j, 2, 5}]},
BoxRatios -> {1, 1, 1}, MeshStyle -> {Thick, Red}] Here is a link to approaches to combine both plots.

cp = ContourPlot[x^2 + y^2, {x, -5, 5}, {y, -5, 5}, Frame -> False,
Axes -> False, PlotRangePadding -> 0, Contours -> {4, 9, 16, 25},
ContourLabels -> (Text[Style[Sqrt[#3], 20], {#1, #2}] &),
ContourStyle -> {{Thick, Red}}];
p1 = Plot3D[Sqrt[x^2 + y^2], {x, -5, 5}, {y, -5, 5},
MeshFunctions -> (#3 &), Mesh -> {Table[{j}, {j, 2, 5}]},
BoxRatios -> {1, 1, 1}, MeshStyle -> {Thick, Red}];

level = -1.2 10^-8; gr =
Graphics3D[{Texture[cp], EdgeForm[],
Polygon[{{-5, -5, level}, {5, -5, level}, {5, 5, level}, {-5, 5,
level}},
VertexTextureCoordinates -> {{0, 0}, {1, 0}, {1, 1}, {0, 1}}]},
Lighting -> "Neutral"];
Show[p1, gr] • Isn't there a small coordinate mismatch between the ContourPlot and the 3D box? – Markus Roellig Nov 13 '13 at 10:18
• Yes, thank you...I did this in a rush to be illustrative and motivating, the texturing plot padding leads to the mismatch...you are absolutely right the non composed images should ok and I should have been more pedantic – ubpdqn Nov 13 '13 at 10:22
• Would you elaborate how ContourLabels -> (Text[Style[Sqrt[#3],20],{#1, #2}] &)] works? – Jack Oct 19 '14 at 21:00

Analysis: Parameter u is the height z of a contour, so take the first two equations for a fixed value of u, e.g.:

 ParametricPlot[{1.25 Cos[v], 1.25 Sin[v]}, {v, 0, 2 Pi}]


whose result, not shown here, is the expected circle.

Implementation: For several heights, apply a function with the height as argument to a list of those heights, producing a list of individual circular images; then combine them all with Show:

 Show[(ParametricPlot[{# Cos[v], # Sin[v]}, {v, 0, 2 Pi},
PlotRange -> {-2.25, 2.25}] &) /@ {0.5, 1, 1.25, 1.5, 1.75, 2} Note that your syntax for the parametric equations had syntax errors: spaces missing between u and the trig function names; trig functions should be Cos and Sin, not cos and sin (built-in names begin with lower-case, and Mathematica is case-sensitive).

• Cool, thanks Murray! – Logan Nov 11 '13 at 22:43