3D Voxels

Neon Cube Corners

Two cubes in opposite corners with neon cyan and coral colors on dark background.

Output
Neon Cube Corners
Python
import matplotlib.pyplot as plt
import numpy as np

# Prepare coordinates
x, y, z = np.indices((10, 10, 10))

# Two cubes in opposite corners
cube1 = (x < 4) & (y < 4) & (z < 4)
cube2 = (x >= 6) & (y >= 6) & (z >= 6)

# Color arrays - using CLAUDE.md palette
colors = np.empty(cube1.shape + (4,), dtype=np.float32)
colors[cube1] = [0.33, 0.08, 0.90, 0.9]  # Deep Purple #5314E6
colors[cube2] = [0.96, 0.15, 0.69, 0.9]  # Pink #F527B0

voxelarray = cube1 | cube2

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

ax.voxels(voxelarray, facecolors=colors, edgecolor='#ffffff20', linewidth=0.3)

ax.set_xlabel('X', fontsize=10, color='#94a3b8', labelpad=10)
ax.set_ylabel('Y', fontsize=10, color='#94a3b8', labelpad=10)
ax.set_zlabel('Z', fontsize=10, color='#94a3b8', labelpad=10)
ax.set_title("Neon Cube Corners", 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')

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