0
$\begingroup$

ContourPlot3D[{x^2 + y^2 == z, 2 y == z, x^2 + (y - 1/2)^2 == 1}, {x, -2, 2}, {y, -0.5, 1}, {z, 0, 2}]

The above isn't what I'm seeking. I'd like to plot $x^2 + (y - 1/2)^2 = 1$ in 2D, so as a circle on the xy-plane ($z = 0$), in the same graph as the other two functions that I'd like in 3D. How would I do this?

halirutan's answer nearly resolves this, but his plot still contains $x^2 + (y - 1/2)^2 = 1$ in 3D for all $z$.
I want solely the trace in the xy-plane, for the combined plot of all 3 functions.

$\endgroup$
6
$\begingroup$

You question is not completely clear. What you can do is the following: You make a 2d contour plot of your second equation and transform this into a 3d graphics by appending a 0 (z=0) to all Line points appearing in the 2d graphics and turning the lines into Tube's:

Show[
 ContourPlot3D[{x^2 + y^2 == z, 2 y == z, 
   x^2 + (y \[Minus] 1/2)^2 == 1}, {x, -2, 2}, {y, -0.5, 1}, {z, 0, 
   2}, ContourStyle -> Opacity[.3]],
 Graphics3D[{Red, 
   Cases[Normal[
     ContourPlot[x^2 + (y - 1/2)^2 == 1, {x, -2, 2}, {y, -1/2, 1}]], 
    Line[pts_] :> Tube[Append[#, 0] & /@ pts], Infinity]}],
 PlotRange -> All
 ]

Mathematica graphics

$\endgroup$
  • $\begingroup$ +1. Thanks. I emended my question. Do you seize it now? $\endgroup$ – Greek - Area 51 Proposal Apr 4 '14 at 6:18
  • 1
    $\begingroup$ @LePressentiment So you don't want a combined plot? Your 2d graphics can be obtained by ContourPlot[x^2 + (y - 1/2)^2 == 1, {x, -2, 2},{y, -1/2, 1}]]. The question remains, what do you want to do with this 2d graphic? $\endgroup$ – halirutan Apr 4 '14 at 6:57
  • $\begingroup$ Thanks. I do want a combined plot. I've emended my question again. Does this answer your question: "The question remains, what do you want to do with this 2d graphic?" $\endgroup$ – Greek - Area 51 Proposal Apr 5 '14 at 15:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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