Reimagining Victor Vasarely Through Generative Code
Exploring optical art using triangles, motion, and p5.js
Reimagining Victor Vasarely Through Generative Code
Exploring optical art using triangles, motion, and p5.js
The father of Op Art

Victor Vasarely is widely considered the father of Op Art — an artistic movement that explores how geometric patterns can create powerful optical illusions. Instead of depicting real-world objects, Op Art works with perception itself.
Through carefully arranged shapes, contrast, and repetition, artists create images that appear to vibrate, expand, contract, or move. Many of Vasarely’s works rely on a few fundamental ideas: repeated geometric forms, strict visual systems, optical distortion, and perception-driven motion. Even though the artwork is static, the viewer often perceives movement and depth.
“Many Op Art compositions feel almost algorithmic — they follow rules, structures, and transformations.”
While studying these works, I realized something interesting: they follow rules, structures, and transformations — which makes them a natural fit for generative art.
Code as collaborator
Instead of recreating a specific painting, I wanted to reinterpret some of Vasarely’s ideas through code-driven geometry. The goal was to build a generative system where simple geometric rules drive the visual structure, motion emerges from small parametric changes, and repetition creates optical rhythm.
Rather than drawing shapes manually, the computer becomes a collaborator that generates the artwork through rules and parameters. The final result is a looping geometric animation inspired by Op Art principles.
Six ideas behind the sketch
01. Triangular geometry
The composition is anchored entirely in triangles — stacked and layered on top of each other. This creates depth and structure while keeping the visual language minimal and sharp. The triangle becomes both the unit and the canvas. Using triangles introduces strong directional edges that naturally guide the viewer’s eye, echoing the geometric logic of classic Op Art.
02.Shifting edge-points
Each triangle has points that move continuously along its edges. Rather than static vertices, the geometry itself feels alive — the edges become paths, and the motion becomes the message. The points glide along the triangle’s boundaries, creating a constantly shifting relationship between form and movement. This subtle displacement gives the animation its pulsing, breathing quality.
03.Controlled rotation
The entire structure rotates around a central axis. Each triangle layer rotates with slight differences in timing and angle. What starts as a simple spin slowly builds into a wave-like, hypnotic rhythm. Even though every triangle follows the same rule, the combined effect feels far more complex than the sum of its parts.
04.Parametric motion
A continuously cycling parameter controls rotation speed, edge-point position, and layer offset — all at once. It runs from 0 → 1 and then loops back seamlessly. Because of this, the animation never visibly starts or ends — it simply flows in a continuous cycle. The loop feels natural and infinite.
05.Red markers as visual anchors
Small red markers travel along each triangle’s edges, tracing the path of the shifting points. They serve as focal anchors — giving the eye something to follow amidst the spinning layers. Without them, the motion would feel more abstract and harder to read. The markers make the underlying parametric motion visible and understandable.
06.Minimal color palette
The color palette is deliberately restrained. Geometry and motion carry the full visual weight — much like classic Op Art, where contrast and shape do what color complexity would otherwise handle. The red markers stand out precisely because everything else stays quiet.
Why generative art works well for Op Art
Recreating this kind of artwork through code highlights something fascinating about Op Art. Many of its visual effects rely on systems rather than individual drawings — systems built on repetition, symmetry, transformations, and gradual variation. These are exactly the types of structures that computers handle extremely well.
Generative tools allow us to explore variations quickly, animate static visual ideas, experiment with mathematical relationships, and create endless iterations of a concept. In a way, generative art continues the logic that artists like Vasarely pioneered decades ago.
“Once those ideas become code, the artwork transforms from a static image into a living visual system.”
What I learned
Insight 01
Simple rules can produce surprisingly rich and complex visual patterns.
Insight 02
Adding animation transforms static optical patterns into something immersive.
Insight 03
Code becomes a creative medium — you design a system, not individual elements.
Recreating historical art movements through code is a powerful way to understand them. Instead of simply observing an artwork, you begin to reconstruct the logic behind it. You start asking questions like: What rules define this composition? How does repetition shape perception? What mathematical relationships create the illusion?
Once those ideas become code, the artwork transforms from a static image into a living visual system. And that’s where generative art becomes truly exciting.
Originally published at https://kabhinav271.github.io. Link to the animation: https://editor.p5js.org/abhinav_k/full/Wu_9dPiuO
메타데이터
- post_id
- dcac25a76cf7
- slug
- reimagining-victor-vasarely-through-generative-code-dcac25a76cf7
- url
- https://medium.com/@abhinavk10/reimagining-victor-vasarely-through-generative-code-dcac25a76cf7
- canonical_url
- https://medium.com/@abhinavk10/reimagining-victor-vasarely-through-generative-code-dcac25a76cf7
- author_url
- https://medium.com/@abhinavk10
- status
- ok
- fetched_at
- 2026-06-20 20:29:01