import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
import numpy as np
def figure():
fig = plt.figure(figsize=(8,6))
axes = fig.gca(projection='3d')
x = np.linspace(-3, 3, 100)
y = np.linspace(-3, 3, 100)
x, y = np.meshgrid(x, y)
f1 = lambda x, y: x**2 + y**2
f2 = lambda x, y: (12 -x**2 -y**2)**0.5
axes.plot_surface(x, y, f1(x, y), alpha=0.05)
axes.plot_surface(x, y, f2(x, y), alpha=0.05)
axes.set_xlim(-5,5)
axes.set_ylim(-5,5)
figure()
I would like to somehow make the intersecting surfaces as dim as I can and bring out the body that is created via intersection. As things stand right now, this doesn't look too convincing and I am out of my element. How can I achieve what I described?