Mathematica Plot 3D Intersection of x+y+z=1 & x^2+y^2+z^2=1 - Mathematica

AI Thread Summary
To plot two separate functions using the Plot3D command in Mathematica, one effective method is to create individual plot strings for each function and then combine them using the Show function. For example, to visualize the intersection of the planes defined by the equations x + y + z = 1 and x^2 + y^2 + z^2 = 1, users can define each function separately with Plot3D and then use Show to display them together. The syntax involves setting up each plot with DisplayFunction -> Identity to suppress individual displays, followed by combining them in Show. This method is applicable for both 2D and 3D plots in Mathematica.
amcavoy
Messages
663
Reaction score
0
If I am using the Plot3D command in Mathematica, how can I plot two separate functions on the same coordinates? Specifically, I am trying to get a picture of the intersection of x+y+z=1$ with x^{2}+y^{2}+z^{2}=1.
 
Physics news on Phys.org
I suck at mathematica and probably won't help too much, but when I plot many functions or equations I do,
string = Plot[xxxxxxxxxxxxxxxxxxx, DisplayFunction -> Identity]
string2 = Plot[xxxxxxxxxxxxxxxxxxx, DisplayFunction -> Identity]
...
...
...
Show[{string, string2,...}, DisplayFunction -> $DisplayFunction]

It works for both plots2d and 3d in my mathematica. I dunno.
 
Plot3D[{1-x-y},{(1-x^2-y^2)^0.5},{x,-10,10},{y,-10,10}]

Should work, I think...

(Although I use Mathematica rarely - Matlab always :-p )
 
Those worked, thanks a lot guys :smile:.
 

Similar threads

Replies
4
Views
2K
Replies
1
Views
2K
Replies
1
Views
2K
Replies
1
Views
2K
Replies
1
Views
2K
Replies
13
Views
2K
Replies
4
Views
3K
Back
Top