A Pine Tree Proper
Copilots, teaching, and unexpected results.
Hello from Maine. I’ve been here the past week.
I was taking a walk this morning, looking at some beautiful, and very Maine-like, pine trees.
I was feeling sad about leaving, and wanted to make something to remind me of these trees. So I thought I’d try and capture one with my ongoing (but as-yet-untitled) project where I’m using AI to write code that then generates the images. Here are some flowers from that series…
This AI coding project involves working with an AI “copilot” that functions as a kind-of coding assistant. I can ask it to write some code from scratch or I can highlight some existing code and ask it to fix a bug or make a change (say, make the flower petals bigger). It’s a (surprisingly slow) back-and-forth process of trying to get it to create something that is aesthetically satisfying.
So back to the trees. Did you know that Maine is having a contest to redesign their state flag? They want something that includes a pine tree and the rules state that “the flag should be ‘so simple that a child can draw it from memory.’” I thought maybe the design brief would have a description for that archetypal pine tree that I could use to instruct my AI to write code to generate a pine tree.
Here’s what the design brief says the flag should be:
“Must be buff, charged with the emblem of the State, a pine tree proper, in the center, and the North Star, a mullet of 5 points, in blue in the upper corner; the star to be equidistant from the hoist and the upper border of the flag, the distance from the 2 borders to the center of the star being equal to about 1/4 of the hoist, this distance and the size of the star being proportionate to the size of the flag . . .”
What’s “buff?” But also, what is meant by a “pine tree proper?” (Are these just strange New Englandisms?) Not very helpful.
But good-ol’ ChatGPT did have an answer:
"A pine tree proper" in heraldry refers to a naturalistic depiction of a pine tree. In heraldic terminology, "proper" means that the object is depicted in its natural colors rather than a stylized or symbolic color scheme.
Plus ChatGPT gave me a reasonable description of the elements that make up a pine tree. So I used that as part of the prompt to have it write a function that would draw a pine tree. Here’s a screenshot of Visual Code Studio showing the prompt at the top, and the start of some of the code it wrote:
It’s fascinating watching the AI copilot type-out the code. There’s a confidence to the speed at which it completes the task I’ve given it. Once it finishes the next step is for me to hit the “run” button and see how the generated pine tree looks.
Not quite what I was expecting. If you zoom in it has some of the qualities of a pine tree on a very windy day. But that’s ok, working with an AI copilot is a dialog. It takes some time to explain what I’m looking for.
So I say, “The tree is too small and appears in the top left corner of the window. It should be larger and centered.
“ Copilot gives me some new code, I hit run:
What’s interesting is that the first tree image seemed to have a lot more details (branches? needles?) than this new one. Where are those details hiding? So I give a new prompt:
The branches should be wider at the base of the tree, and the color of the branches and needles should have slight random color variation.
Not at all what I had expected to see. If I was a teacher critiquing a student’s work I might say something about the unusual yet elegant flow of the branches. But, where are the needles?
After a little more back-and-forth with my copilot (I don't see the needles. Are they being drawn offscreen?
) the needles finally show up:
I’m starting to worry that my student has never seen a pine tree. I’m also concerned that I may be anthropomorphizing this coding tool.
We go through several more attempts… of me trying to explain what a pine tree should look like, and of it creating trees which it thinks are more in line with what I want.
Oh, and I looked-up “buff.” Google didn’t have an answer. But ChatGPT gave me something (made-up or correct, I’m not sure) that sounded reasonable:
The color "buff" in the context of the Maine state flag refers to a light, yellowish-brown color. It is often described as a pale, warm yellow or tan. This color is typically used to represent a natural, earthy tone, similar to the color of unbleached linen or certain types of leather.
And another prompt/correction: Make sure that the needles for each branch are scattered within the triangle of the branch.
Modify the branches so that their top points don't all touch the top of the tree. Instead their top points should gradually move up to the top of the tree as their width narrows and their bottom edge rises up the tree's trunk.
I worry that the comments I’ve been making to my student haven’t been particularly helpful. I’ve given them bad directions. I am horrible teacher. What could I have done differently? Could I have even done this project myself?
How do I know when it’s time to stop? Honestly, this co-pilot interaction is pretty maddening. It generates code which, at times is nonsensical. Its structure foreign enough that I can’t just take over and make changes to the code directly. Instead I’m trapped in an endless dialog with an enthusiastic collaborator who really doesn’t understand what we’re doing.
But maybe I need to reset my expectations. Each of these trees has its own unexpected charm. They may not what I was expecting when I started coding this tree. But the results are Maine-like.
Should I submit a design for the Maine state flag using one of them?
The design brief has an answer for me:
Nope.