Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

This question already has an answer here:

How can I plot two equations in one 3D graph. I have to plot x^2+y^2=1 and x^2+y^2+z^2=2 but I want tu plot only their intersection :(

Thank you

share|improve this question

marked as duplicate by J. M. Apr 20 '13 at 12:56

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

    
There were many similar questions so most likely this is a duplicate e.g. take a look at this : mathematica.stackexchange.com/questions/5968/…. Perhaps another hint : mathematica.stackexchange.com/questions/17799/… –  Artes Apr 20 '13 at 12:20
    
You are plotting x^2 + y^2 = 1. That's the unit circle. The second equation says 1+z^2=2, so z^2=1. Assuming we're talking about real numbers, this means either z=1 or z=-1. So your plot is: a unit circle at z=1 and another unit circle at z=-1. –  bill s Apr 20 '13 at 12:42

1 Answer 1

Using the first link provided by Artes in the comments:

ContourPlot3D[{x^2 + y^2 - 1, x^2 + y^2 + z^2 - 2},
 {x, -2, 2}, {y, -2, 2}, {z, -2, 2},
 ContourStyle -> None, Mesh -> None, 
 BoundaryStyle -> {1 -> None, 2 -> None, {1, 2} -> Black}]
share|improve this answer

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