0
$\begingroup$

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.

$\endgroup$

closed as off-topic by MarcoB, LLlAMnYP, m_goldberg, Michael E2, RunnyKine Apr 27 '16 at 17:34

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question arises due to a simple mistake such as a trivial syntax error, incorrect capitalization, spelling mistake, or other typographical error and is unlikely to help any future visitors, or else it is easily found in the documentation." – MarcoB, LLlAMnYP, m_goldberg, Michael E2, RunnyKine
If this question can be reworded to fit the rules in the help center, please edit the question.

  • $\begingroup$ Show us the code you have tried so far. $\endgroup$ – MarcoB Apr 27 '16 at 14:57
  • $\begingroup$ There is an image of what i have tried $\endgroup$ – Andrés Bustamante Apr 27 '16 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 '16 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 '16 at 15:20
  • $\begingroup$ Lose the z = inside Plot. $\endgroup$ – Michael E2 Apr 27 '16 at 15:21
6
$\begingroup$
ContourPlot3D[
 {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

$\endgroup$
1
$\begingroup$

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

Plot3D[
   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:

plot3d

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:

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

graphics

$\endgroup$
  • $\begingroup$ Thank you all this is what i was looking for. $\endgroup$ – Andrés Bustamante Apr 27 '16 at 15:36

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