Just went back in and tried an even simpler request for the platonic solids, and instead of calling its new image generator, it decided to try python instead. Still didn’t go well:
Summary
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d.art3d import Poly3DCollection
import numpy as np
# Helper function to draw a platonic solid
def draw_solid(ax, vertices, faces, title):
ax.set_title(title)
ax.add_collection3d(Poly3DCollection([vertices[face] for face in faces], edgecolor='k', alpha=0.6))
ax.scatter(vertices[:, 0], vertices[:, 1], vertices[:, 2], color='r')
ax.set_box_aspect([1,1,1])
ax.axis('off')
fig = plt.figure(figsize=(15, 10))
# Tetrahedron
tetra_vertices = np.array([
[1, 1, 1], [-1, -1, 1], [-1, 1, -1], [1, -1, -1]
])
tetra_faces = [[0, 1, 2], [0, 1, 3], [0, 2, 3], [1, 2, 3]]
# Cube
cube_vertices = np.array([
[-1, -1, -1], [1, -1, -1], [1, 1, -1], [-1, 1, -1],
[-1, -1, 1], [1, -1, 1], [1, 1, 1], [-1, 1, 1]
])
cube_faces = [[0, 1, 2, 3], [4, 5, 6, 7],
[0, 1, 5, 4], [2, 3, 7, 6],
[1, 2, 6, 5], [4, 7, 3, 0]]
# Octahedron
oct_vertices = np.array([
[1, 0, 0], [-1, 0, 0],
[0, 1, 0], [0, -1, 0],
[0, 0, 1], [0, 0, -1]
])
oct_faces = [[0, 2, 4], [2, 1, 4], [1, 3, 4], [3, 0, 4],
[0, 2, 5], [2, 1, 5], [1, 3, 5], [3, 0, 5]]
# Dodecahedron (approximate coordinates)
phi = (1 + np.sqrt(5)) / 2
a, b = 1, 1 / phi
dodeca_vertices = np.array([
[-a, -a, -a], [-a, -a, a], [-a, a, -a], [-a, a, a],
[a, -a, -a], [a, -a, a], [a, a, -a], [a, a, a],
[0, -b, -phi], [0, -b, phi], [0, b, -phi], [0, b, phi],
[-b, -phi, 0], [-b, phi, 0], [b, -phi, 0], [b, phi, 0],
[-phi, 0, -b], [phi, 0, -b], [-phi, 0, b], [phi, 0, b]
])
dodeca_faces = [
[0, 8, 10, 2, 16], [0, 16, 18, 1, 12], [0, 12, 14, 4, 8],
[1, 18, 6, 10, 8], [1, 8, 4, 5, 9], [1, 9, 11, 3, 13],
[2, 10, 6, 17, 16], [3, 11, 7, 15, 13], [4, 14, 19, 5, 8],
[5, 19, 7, 11, 9], [6, 18, 16, 17], [7, 19, 15, 13]
]
# Icosahedron
ico_vertices = np.array([
[0, 1, phi], [0, -1, phi], [0, 1, -phi], [0, -1, -phi],
[1, phi, 0], [-1, phi, 0], [1, -phi, 0], [-1, -phi, 0],
[phi, 0, 1], [-phi, 0, 1], [phi, 0, -1], [-phi, 0, -1]
])
ico_faces = [
[0, 1, 8], [0, 1, 9], [0, 4, 5], [0, 4, 8], [0, 5, 9],
[1, 6, 7], [1, 6, 8], [1, 7, 9], [2, 3, 10], [2, 3, 11],
[2, 4, 5], [2, 4, 10], [2, 5, 11], [3, 6, 7], [3, 6, 10],
[3, 7, 11], [4, 8, 10], [5, 9, 11], [6, 8, 10], [7, 9, 11]
]
# Plot each solid
ax1 = fig.add_subplot(231, projection='3d')
draw_solid(ax1, tetra_vertices, tetra_faces, "Tetrahedron")
ax2 = fig.add_subplot(232, projection='3d')
draw_solid(ax2, cube_vertices, cube_faces, "Cube (Hexahedron)")
ax3 = fig.add_subplot(233, projection='3d')
draw_solid(ax3, oct_vertices, oct_faces, "Octahedron")
ax4 = fig.add_subplot(234, projection='3d')
draw_solid(ax4, dodeca_vertices, dodeca_faces, "Dodecahedron")
ax5 = fig.add_subplot(235, projection='3d')
draw_solid(ax5, ico_vertices, ico_faces, "Icosahedron")
plt.tight_layout()
plt.show()