Living Museum of Learning

Where real moments become exhibits
← Prev Next →
The Icosahedron: 12 Vertices, 1000 Tiny Mistakes

The Icosahedron: 12 Vertices, 1000 Tiny Mistakes

Poor Albert calmly fought brackets, commas, parentheses—and discovered abstraction along the way. 😂

The soccer-ball project needs geometry.

Before we can build the familiar soccer ball, we need to understand one of its mathematical ancestors: the icosahedron, a Platonic solid with 12 vertices.

Albert began by defining the twelve 3D points:

let points = [
[m,0,s],[-m,0,s],[-m,0,-s],[m,0,-s],
[s,m,0],[s,-m,0],[-s,m,0],[-s,-m,0],
[0,s,m],[0,s,-m],[0,-s,m],[0,-s,-m]
];

Then came the less glamorous part of programming.

Missing commas.

Mismatched { ... ].

Broken [s, 0, ]);.

A file modified in one place but tested in another.

And finally, a mysterious icosahedron that showed only eight vertices, with one apparently stuck at the origin.

Albert had been about to copy and paste the same four lines of

push() → translate() → sphere() → pop()

over and over.

Instead of copying the operation, Donald asked:

“Should we create a function here?”

Albert didn't answer.

He did something better.

He created a for loop that applied the same operation to all 12 points.

for(let i=0;i<12;i++) {
push();
translate(points[i][0],points[i][1],points[i][2]);
sphere(10);
pop();
}

The twelve vertices had become data, and the operation had become one reusable procedure.

The final bug was almost poetic.

The code contained:

pop

instead of:

pop();

The result was a bizarre geometric mystery.

Why eight vertices?

Why was one sitting at the origin?

Donald pointed to the missing parentheses.

Albert immediately laughed:

“Ahhhhhhhh ~” 😂

And suddenly the icosahedron made sense again.

Albert's class was not merely about drawing an icosahedron.

He experienced several fundamental lessons of programming:

The computer reads exactly what we write, not what we mean.
Tiny syntax errors can create completely mysterious symptoms.
Repeated code is often a signal that a deeper pattern is hiding underneath.
Data can be stored separately from the operation performed on that data.
A for loop can turn twelve copies of an operation into one idea.

Most importantly, Albert discovered structure himself.

He didn't simply follow a command to “make a loop.”

He saw twelve similar objects and recognized:

Do the same thing to every point.

That is the beginning of abstraction.

Epilogue

The icosahedron is only the beginning.

We didn't create it because twelve spheres are particularly exciting.

We created it because the soccer ball needs it.

And somewhere between the Platonic solids, Python/P5.js code, missing commas, and Albert's long-suffering “Ahhhhhhhh~”, mathematics and programming began to connect.

The soccer ball is waiting.