Yesterday We Had Two Wheels Only
Situation
Cloud was building a 3D world with JavaScript and p5.js.
On the first day, he had two wheels: a pair of cylinders positioned on opposite sides of the coordinate system, spinning together.
We tried using a for loop to create five pairs of spinning wheels. But something went wrong. Instead of each pair spinning as intended, the whole arrangement rotated around the axis of the leftmost pair.
We had a problem to solve.
Turning Point
The next day, we started again with the working pair.
First, we removed the for loop. Then we translated the pair along the x-axis, checking that it still spun correctly.
It worked.
Only then did we bring back the loop, duplicating the working pair at five different x-coordinates.
Cloud had learned an important programming lesson: establish a working building block before multiplying it.
Next, he wanted caterpillar tracks. But we didn't yet know how to construct the curved sections, so he flexibly changed direction.
“We can do body then.”
And the tank began to emerge.
Emergence
Cloud asked how to draw a rectangular shape.
“box,” I answered.
He experimented with its three dimensions, rotated the shape, and created a plate between the wheels. Then he made it ridiculously thick.
“It looks like a coffin, touching the ground. Your wheels are floating now,” I told him.
“OK, wheels landed now.”
LOL!
With the body in place, Cloud moved upward to the turret. Neither of us knew the English word at first. He searched for it, found “turret,” and named the function drawTurret().
Cloud thought the turret looked like an ellipsoid. We discussed simplifying it with familiar 3D primitives.
“Oh, torus is good!”
He had an idea. A sphere could complete the top, and a cylinder could become the cannon.
Then came another challenge: the cannon needed to rotate together with the turret.
We had already learned from the failed wheel experiment that rotation depends on coordinates and the pivot point. So we spent time getting the turret to spin correctly.
“What's the x offset of our sphere?” I asked.
“150*s,” Cloud answered.
“So let's move it back to x = 0 first, using -150*s.”
It worked.
“Now move the whole working thing back to its original location, using 150*s.”
I noticed that Cloud had added a plus sign in front of the already working value 150*s.
LOL! A tiny detail, but another opportunity to pay attention to what the code actually says.
By the end of the second day, we had five pairs of spinning wheels, a body, a turret, and a cannon — all assembled into a recognizable 3D tank.
When Cloud looked back at the previous day's work, he said:
“Yesterday we had 2 wheels only.”
He was absolutely right.
Learning
This project was not a matter of following a recipe.
Cloud made decisions, tried ideas, checked results, and changed direction when necessary. Sometimes he discovered a useful shape; sometimes he encountered a limitation. Sometimes we had to stop and investigate why a transformation behaved differently from what we expected.
Several important ideas emerged naturally:
Reuse before duplication: Make one component work before using a loop to create many.
Experiment with parameters: Three arguments to box() became a way to explore dimensions and proportions.
Build with primitives: Spheres, cylinders, boxes, and a torus can combine to approximate a complex object.
Understand coordinate transformations: Rotation depends on the relationship between an object, its position, and the chosen origin.
Adapt when blocked: When the curved caterpillar tracks were beyond our current knowledge, Cloud chose to build the body instead.
The tank was the visible result. The more important achievement was learning how to keep moving forward when the next step wasn't obvious.
Theme
First make one thing work. Then build the next thing on top of it.
Doors
Programming: loops, functions, variables, and reusable components
Mathematics: coordinates, dimensions, rotation, and transformations
3D modeling: constructing complex objects from simple shapes
Engineering: experimentation, debugging, and design trade-offs
Learning: flexibility, persistence, and building on working knowledge