best way to plot the 3D shape made by many intersecting f(x,y,z) functions?

778 Views Asked by At

What's the best way to use a computer to plot the 3D shape made by many intersecting f(x,y,z) functions?

I was trying to do something like the following, except I still have not idea what the shape the intersecting functions makes when viewing the plot because its too messy:

# Jupyter Notebook
#--------------------------------------------
# attempting to visualize the intersections of 
# the following f(x,y,z) functions:
#    y = x         <= 3D-plane
#    z = x + y     <= 3D-plane
#    z = 0         <= 3D-plane
#    y = 0         <= 3D-plane
#    x = 1         <= 3D-plane

%matplotlib
from mpl_toolkits.mplot3d import Axes3D
import matplotlib.pyplot as plt
import numpy as np

def NewPlot():
    fig = plt.figure()
    ax  = Axes3D(fig)
    ax.set_xlabel('X')
    ax.set_ylabel('Y')
    ax.set_zlabel('Z')
    return ax

def Mesh():
    A=np.linspace(-5,5,20)
    B=np.linspace(-5,5,20)
    A,B=np.meshgrid(A,B)
    return A,B

ax = NewPlot()

# Graph y = x
X,Z = Mesh()
Y = X
ax.scatter(X,Y,Z)

# Graph z = x+y
X,Y = Mesh()
Z=X+Y
ax.scatter(X,Y,Z)

# Graph Z = 0
X,Y = Mesh()
Z=0*X
ax.scatter(X,Y,Z)

# Graph Y = 0
X,Z = Mesh()
Y=0*X
ax.scatter(X,Y,Z)

# Graph X = 1
Y,Z = Mesh()
X=1 + 0*Y
ax.scatter(X,Y,Z)

plt.show()

i realize this might be asking for much, but if there were a way to just show the points on the surface of the intersecting functions? it doesn't necessarily need to be matplotlib based, could be done in other math scripting languages such as octave, R, etc...