import numpy as np
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
fig = plt.figure()
ax = fig.add_subplot(111, projection='3d')
# Define the cone parameters
radius = 1
height = 2
# Create the cone
u = np.linspace(0, 2 * np.pi, 100)
v = np.linspace(0, height, 100)
x = radius * np.outer(np.cos(u), np.ones(100))
y = radius * np.outer(np.sin(u), np.ones(100))
z = np.outer(np.ones(100), v)
ax.plot_surface(x, y, z, color='b')
plt.show()
aW1wb3J0IG51bXB5IGFzIG5wCmltcG9ydCBtYXRwbG90bGliLnB5cGxvdCBhcyBwbHQKZnJvbSBtcGxfdG9vbGtpdHMubXBsb3QzZCBpbXBvcnQgQXhlczNECgpmaWcgPSBwbHQuZmlndXJlKCkKYXggPSBmaWcuYWRkX3N1YnBsb3QoMTExLCBwcm9qZWN0aW9uPSczZCcpCgojIERlZmluZSB0aGUgY29uZSBwYXJhbWV0ZXJzCnJhZGl1cyA9IDEKaGVpZ2h0ID0gMgoKIyBDcmVhdGUgdGhlIGNvbmUKdSA9IG5wLmxpbnNwYWNlKDAsIDIgKiBucC5waSwgMTAwKQp2ID0gbnAubGluc3BhY2UoMCwgaGVpZ2h0LCAxMDApCnggPSByYWRpdXMgKiBucC5vdXRlcihucC5jb3ModSksIG5wLm9uZXMoMTAwKSkKeSA9IHJhZGl1cyAqIG5wLm91dGVyKG5wLnNpbih1KSwgbnAub25lcygxMDApKQp6ID0gbnAub3V0ZXIobnAub25lcygxMDApLCB2KQoKYXgucGxvdF9zdXJmYWNlKHgsIHksIHosIGNvbG9yPSdiJykKCnBsdC5zaG93KCk=