Coding With ChatGPT
Ariel Cooke - 2023
As an designer, I am always excited to use new tools to inform my workflow and design process. I recently turned to ChatGPT to assist me in writing a custom Python script for Rhino that automates the placement of rendering elements on a surface.
With only a basic understanding of coding, I was able to navigate the nuances of the Python programming language and Rhinoscriptsyntax to create a functioning script.
I had initially built a Grasshopper definition to accomplish this task. It worked... but it was clunky and less likely to be used by teammates who are not Grasshopper-savvy.
I wanted to make something that would be as easy to use as any other command in Rhino.
I was familiar with python for Rhino, but had yet to dive in.
I started by asking ChatGPT to write a script in the same way I would have asked a person who would be willing to code for me.
Already I was impressed, though the initial code did not run as described. It did however serve as a good starting point.
As I pieced the code together, I asked additional questions, and for help writing specific functions.
Each answer builds on the entire conversation, and it provides helpful descriptions of what parts of the code do.
It was more like having a skilled programmer available to answer my questions than just an AI coding for me.
Using this tool, I was able to write a simple Python script that prompts a user to select the target surface and choose any amount of blocks to populate on it.
The script has additional parameters such as amount of blocks, rotation, and random scaling within a given range.
I am impressed by ChatGPT’s ability to write code in a niche language like Python for Rhino and am excited to see how tools like these can help us unlock efficiencies and develop new workflows in architecture and other fields.
It is clear to me that the integration of advanced technologies such as ChatGPT into our workflows is essential for staying ahead in the fast-paced world of architecture and design.
By embracing these new tools, we are able to free up valuable time and resources to focus on the creative and meaningful aspects of our work.
Also it’s a lot of fun.