# How to graph a sphere with cartesian equations?

I'm new to Mathematica and I need to ask how to graph a sphere, cylinder, etc.. using cartesian equations.

For example in sphere's case $x^2+y^2+z^2=1$

I tried to use Plot3D but it doesn't work..

-
Mathematica's help docs are generally going to be your #1 resource. Click on Plot3D, hit F1, and within a click or two you will find RegionPlot3D and other related functions (by following the "see also" links at the bottom). – amr Apr 27 '13 at 19:00

RegionPlot3D[x^2 + y^2 + z^2 <= 1, {x, -1, 1}, {y, -1, 1}, {z, -1, 1}]


or

RegionPlot3D[Norm[{x, y, z}] <= 1, {x, -1, 1}, {y, -1, 1}, {z, -1, 1}]


RegionPlot3D[x^2 + y^2 <= 1, {x, -1, 1}, {y, -1, 1}, {z, -1, 1}]


Edit
All together now!

opt = {Mesh -> False, Boxed -> False, Axes -> False};
Show[
RegionPlot3D[x^2 + y^2 + z^2 <= 1, {x, -1, 1}, {y, -1, 1}, {z, -1, 1},
Evaluate@opt, PlotStyle -> Directive[Yellow]],
RegionPlot3D[x^2 + y^2 <= 1, {x, -1, 1}, {y, -1, 1}, {z, -1, 1},
Evaluate@opt, PlotStyle -> Directive[Red, Opacity[0.5]]]]


-
Or ContourPlot3D[ x^2 + y^2 + z^2 == 1, {x, -1, 1}, {y, -1, 1}, {z, -1, 1}] – Silvia Apr 27 '13 at 16:33
Thank you very much Silvia =))) – German Apr 27 '13 at 16:55
@belisarius: Using RegionPlot3D gives the "solid sphere", a 3-manifold, whereas the OP asked for the spherical surface, a 2-manifold, and that's what ContourPlot3D gives. (Not that one would see much difference graphically--unless one began slicing into the object.) – murray Apr 28 '13 at 15:32
@murray Thanks. I'm aware of that, but as the OP asked for a "graph" and not for a mathematical description of the surface, I think the result is "almost but not quite .." – Dr. belisarius Apr 28 '13 at 15:57