3D Line

Cinquefoil Knot

The cinquefoil knot (5₁), a prime knot with crossing number 5, rendered in pink tones on light background.

Output
Cinquefoil Knot
Python
import matplotlib.pyplot as plt
import numpy as np

# Cinquefoil knot (5_1 knot)
n = 1000
t = np.linspace(0, 2 * np.pi, n)

# Cinquefoil parametric equations
x = np.cos(2*t) * (2 + np.cos(5*t))
y = np.sin(2*t) * (2 + np.cos(5*t))
z = np.sin(5*t)

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

# Rose/pink on light background
ax.plot(x, y, z, color='#be185d', linewidth=3, alpha=0.3)
ax.plot(x, y, z, color='#ec4899', linewidth=1.8)

ax.set_xlim(-4, 4)
ax.set_ylim(-4, 4)
ax.set_zlim(-2, 2)

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('Cinquefoil Knot (5₁)', 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.grid(True, alpha=0.3, color='#d1d5db')

ax.view_init(elev=30, azim=60)
plt.tight_layout()
plt.show()
Library

Matplotlib

Category

3D Charts

Did this help you?

Support PyLucid to keep it free & growing

Support