enter image description hereI have to plot 0=x^2-2y+y^2 and z=sqrt(x^2+y^2) for a class project but Mathematica does not accept raw input, any ideas? I have tried with "cylinder" in the functions but it does not work.

  • $\begingroup$ Show us the code you have tried so far. $\endgroup$
    – MarcoB
    Apr 27, 2016 at 14:57
  • $\begingroup$ There is an image of what i have tried $\endgroup$ Apr 27, 2016 at 15:03
  • $\begingroup$ Please post code in textual form, rather than images, so people can easily copy / paste it into their own Mathematica notebook and play with it. Here is some help on doing that: copying code; formatting. $\endgroup$
    – MarcoB
    Apr 27, 2016 at 15:08
  • $\begingroup$ Welcome to Mathematica.SE! I suggest the following: 1) As you receive help, try to give it too, by answering questions in your area of expertise. 2) Take the tour! 3) When you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge. Also, please remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign! $\endgroup$
    – Michael E2
    Apr 27, 2016 at 15:20
  • $\begingroup$ Lose the z = inside Plot. $\endgroup$
    – Michael E2
    Apr 27, 2016 at 15:21

2 Answers 2

 {x^2 + y^2 == 1, z == Sqrt[x^2 + y^2]},
 {x, -2, 2}, {y, -2, 2}, {z, -.5, 2},
 ContourStyle -> Opacity[.65]]

enter image description here


Here are two code samples to get you started. Both snippets achieve the same result:

Plot3D[Sqrt[x^2 + y^2], {x, y} ∈ Disk[{0, 0}, 4]]

or alternatively

   Sqrt[x^2 + y^2], {x, -4, 4}, {y, -4, 4}, 
   RegionFunction -> Function[{x, y, z}, x^2 + y^2 <= 4^2]

Either one generates the following:


A different, possibly easier approach, using the fact that a cone is a solid of revolution:

RevolutionPlot3D[t, {t, 0, 4}]

revolution plot

If you are simply interested in drawing the solid object, rather than plotting it from an equation, you can also use graphics primitives:

 Cone[{{0, 0, 4}, {0, 0, 0}}, 4],
 Axes -> True


  • $\begingroup$ Thank you all this is what i was looking for. $\endgroup$ Apr 27, 2016 at 15:36

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