Python for Creative Coding: A Visual Artist’s Guide to Generative Art (2025)Learning Python For Your Creative Practice

py5 grid with drawing 10x10 grid python art

Python for Creative Coding: A Visual Artist’s Guide to Generative Art

py5 grid with drawing 10x10 grid python art signed

“Architecture is frozen music,” wrote Goethe, capturing how structure can evoke the harmony and rhythm of a composition.

In the same way, a two-dimensional design is frozen music. Repeating shapes, variations, and grids create an architectonic pleasure—a visual score.

This is why, in the Summer of 2025, I am learning Python. I want to expand my art and design practice, using code to compose these visual rhythms. Python’s deep integration with AI will also become a critical tool, opening new creative pathways for my work.

If you are a visual person, you may find like myself, Python courses aren’t that stimulating.

I slogged through an initial Python for beginners book— As a visual learner, I only fully understood it when I took the code to an LLM such as ChatGPT and asked questions like “How do I use this in 3D?” As I did this, I started to understand the concepts of Python.

I need to learn by making and iterating. I also need to learn things that I can put to use in my work.

I often use the website Domestika to learn new thins and  this course jumped out at me =

Designing with Python: Programming for a Visual Context

A course by Alexandre B A Villares

I would highly recommend it.

I just completed this course in the end of September 2025.

Learning things like this gives me new tools in my art box that I can apply in my workflow. The first day of a digital spring.

I am not going to get too m much into the code here too  I am a Python learner. I am just going to talk about the basic concepts I learned.

The Concepts Learned

In the course, you get to learn Pyrthon concepts in a visual way. Particularly –

  1. How to install thonny Python and Py5. I remember this before getting into touch designer
  2. How to make a loop to make a grid
  1. How to easily edit the grid rows and columns.
  2. How to create and  insert shape elements into each grid square at random.
  3. How to add “recursion” with some of the grid square so that the pattern repeats itself again smaller within that square. I like to think of it as “Universes within Universes”
  4. How to add a mouse click to change the composition again and again at random and press a key to save the compositions you are pleased with as PNG files.

As a tradigital artist who liked to combine digital with traditional methods. I wanted to use a simply 2D honeybee sketch in some of the cells. I wanted the work to elude to honeybees and summer flowers.

5. Then what I did was to add my own drawings tradigital, I had to look up and cheat (vibe code) and google to find out how to add an SVG of my original ork.

I also used Adobe colour sheme LINK to find a summer themed colour harmony. I then again used AI to change the code to add tha particular scheme.

You can check my code here, 

because I am learning Python and I did use AI to help me go beyond the aspects of the course, please let me know if the code is not good.

colour scheme
A color scheme based on summer found on the Adobe Color palette generator. website
visual sketch for Python Programming
Working out the grid on paper, with three objects to be repeated, bee, circle and hexagon

Results

py5 grid with drawing 6x6 grid python art v3 signed

“The bees gather hexagon honey from the digital late summer flowers”…

The coding is set up in the course so that when you press S, the image will save into a folder on your computer. Left clicking the mouse will change the image each time randomly changing the pattern.

So you can click the mouse untll you find a pattern you like. S will save that.

“The universal patterns and honeybee tasks repeat as we fly higher”…

You can also easily change the number of columns and rows of the grid like below 10×10.

py5 grid with drawing 10x10 grid python art signed

“Almost like a honeycomb now, patterns emerge, random or some kind of natural orfer?”….

Even to 15×15

py5 grid with drawing 15x15 grid python art signed

Where Can We Take This Next?

With critical thinking skills, we should always think about all the things we can actually use things like this for.

Apply the designs to textiles and fine art signed prints.

Start to look to see how using AI and Python for these kinds of patterns could learn, adapt, flock. Stay tuned this is my next step..

Take it further in 3D  using something like ThreeJSand or add interactivity to the 2D grid. Use it for interactive experiences using Arduinos and the Touch Designer software.

I can help you to make 3D  and now integrate Python into your workflow email me to talk.

Useful Links

Designing with Python: Programming for a Visual Context. The Domestika  Link

Py5 the creative coding framework for Python Link

Alexandre B A Villares website tutor of the domestika course Link

Three.Js language I used for the 3D interactive version Link

Pyde Processing Python examples Link

Python programming language Link

Buy versions of this print Shop

Get in touch with me for a 121 trial tuition session Email

Explore Articles

long days big clouds

Spirit Of The Ages

August 1990, North Norfolk, England Unseen forces  were operating high above the flat North Norfolk skies. The long summer holidays became too bright, too windy,  

Read More »