3D Wireframe
Klein Bottle Wireframe
Klein bottle immersion wireframe with pink neon styling.
Output
Python
import matplotlib.pyplot as plt
import numpy as np
# Klein bottle parametric
u = np.linspace(0, 2 * np.pi, 60)
v = np.linspace(0, 2 * np.pi, 40)
U, V = np.meshgrid(u, v)
r = 4 * (1 - np.cos(U) / 2)
X = 6 * np.cos(U) * (1 + np.sin(U)) + r * np.cos(U) * np.cos(V) * (U < np.pi) + r * np.cos(V + np.pi) * (U >= np.pi)
Y = 16 * np.sin(U) + r * np.sin(U) * np.cos(V) * (U < np.pi)
Z = r * np.sin(V)
fig = plt.figure(figsize=(10, 8), facecolor='#020B14')
ax = fig.add_subplot(111, projection='3d', facecolor='#020B14')
ax.plot_wireframe(X, Y, Z, rstride=2, cstride=2, color='#F527B0', linewidth=0.4, alpha=0.9)
ax.set_xlabel('X', fontsize=11, color='#94a3b8', labelpad=10)
ax.set_ylabel('Y', fontsize=11, color='#94a3b8', labelpad=10)
ax.set_zlabel('Z', fontsize=11, color='#94a3b8', labelpad=10)
ax.set_title('Klein Bottle Wireframe', fontsize=14, color='white', fontweight='bold', pad=20)
ax.tick_params(colors='#64748b', labelsize=8)
ax.xaxis.pane.fill = False
ax.yaxis.pane.fill = False
ax.zaxis.pane.fill = False
ax.xaxis.pane.set_edgecolor('#1e293b')
ax.yaxis.pane.set_edgecolor('#1e293b')
ax.zaxis.pane.set_edgecolor('#1e293b')
plt.tight_layout()
plt.show()
Library
Matplotlib
Category
3D Charts
More 3D Wireframe examples
☕