3D Surface

Enneper Minimal Surface

Self-intersecting minimal surface with elegant mathematical properties.

Output
Enneper Minimal Surface
Python
import matplotlib.pyplot as plt
import numpy as np
from matplotlib.colors import LinearSegmentedColormap

colors = ['#ffffff', '#dbeafe', '#276CF5', '#1e40af', '#1e3a8a']
cmap = LinearSegmentedColormap.from_list('neon_blue', colors, N=256)

u = np.linspace(-2, 2, 80)
v = np.linspace(-2, 2, 80)
U, V = np.meshgrid(u, v)

X = U - U**3/3 + U*V**2
Y = V - V**3/3 + V*U**2
Z = U**2 - V**2

fig = plt.figure(figsize=(10, 8), facecolor='#ffffff')
ax = fig.add_subplot(111, projection='3d', facecolor='#ffffff')

surf = ax.plot_surface(X, Y, Z, cmap=cmap, linewidth=0, antialiased=True)

ax.set_xlabel('X', color='#1f2937', fontsize=10)
ax.set_ylabel('Y', color='#1f2937', fontsize=10)
ax.set_zlabel('Z', color='#1f2937', fontsize=10)
ax.set_title('Enneper Minimal Surface', color='#1f2937', fontsize=14, fontweight='bold', pad=20)

ax.tick_params(colors='#6b7280', labelsize=8)
ax.xaxis.pane.fill = False
ax.yaxis.pane.fill = False
ax.zaxis.pane.fill = False
ax.xaxis.pane.set_edgecolor('#e5e7eb')
ax.yaxis.pane.set_edgecolor('#e5e7eb')
ax.zaxis.pane.set_edgecolor('#e5e7eb')

ax.view_init(elev=25, azim=45)
plt.tight_layout()
plt.show()
Library

Matplotlib

Category

3D Charts

Did this help you?

Support PyLucid to keep it free & growing

Support