Generative art in Python: Nested Squares

Опубликовано: 20 Март 2026
на канале: Coding Cassowary
6,221
157

In this video we have a look at an early piece of computer-generated art. The canvas is tiled with squares. Within each of these "outer" squares there are a bunch of "inner" squares stacked into one another. Random offsets in either direction make for a 3D-like overall effect.

Contents:
00:00 Introduction
02:07 draw_squares( )
05:15 Drawing the outer squares
06:50 Drawing the inner squares
09:20 Shrinkage
10:58 set_theme( )

Video links:
🎥 Generative art playlist:    • Generative art  

Sources:
🔗 Computer Graphics and Art, November 1976: https://github.s3.amazonaws.com/downl...

Coding Cassowary:
🔗 YouTube:    / @codingcassowary6391  
🔗 Twitter:   / cassowarycoding  

Note:
This video includes music from: https://www.bensound.com/