3D Fill Between

3D Seashell Spiral Geometry

Mathematical visualization of seashell spiral geometry using logarithmic curves.

Output
3D Seashell Spiral Geometry
Python
import matplotlib.pyplot as plt
import numpy as np

fig = plt.figure(figsize=(12, 9), facecolor='#ffffff')
ax = fig.add_subplot(111, projection='3d')
ax.set_facecolor('#ffffff')

n = 400
t = np.linspace(0, 6*np.pi, n)

# Logarithmic spiral
a, b = 0.1, 0.15
r_outer = a * np.exp(b * t)
r_inner = 0.7 * a * np.exp(b * t)

x_outer = r_outer * np.cos(t)
y_outer = r_outer * np.sin(t)
z_outer = t / 3

x_inner = r_inner * np.cos(t)
y_inner = r_inner * np.sin(t)
z_inner = t / 3

ax.plot(x_outer, y_outer, z_outer, linewidth=2.5, color='#F59E0B')
ax.plot(x_inner, y_inner, z_inner, linewidth=2, color='#8B5CF6')

# Shell surface
for i in range(0, n, 5):
    ax.plot([x_outer[i], x_inner[i]], [y_outer[i], y_inner[i]], [z_outer[i], z_inner[i]], 
            color='#EC4899', alpha=0.25, linewidth=0.6)

ax.set_xlabel('X', fontsize=11, color='#1f2937')
ax.set_ylabel('Y', fontsize=11, color='#1f2937')
ax.set_zlabel('Z', fontsize=11, color='#1f2937')
ax.set_title('Seashell Spiral Geometry', fontsize=14, color='#1f2937', fontweight='bold', pad=15)

ax.tick_params(colors='#374151', labelsize=9)
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.grid(True, alpha=0.3, color='#d1d5db')

plt.tight_layout()
plt.show()
Library

Matplotlib

Category

3D Charts

Did this help you?

Support PyLucid to keep it free & growing

Support