The Art of the Algorithm: Generative Visuals in Fezcodex
Art in the digital age isn't just about pixels and brushes; it's about rules, logic, and mathematics. In Fezcodex, I've integrated several "visual experiments" that turn code into aesthetics. From the subtle backgrounds of cards to full-blown design laboratories, let's explore how these algorithms work.
The Heart: GenerativeArt
You might have noticed unique geometric patterns appearing behind various elements in the site. These are powered by the GenerativeArt component.
Seeded Randomness
Imagine you have a robot that can draw. If you tell the robot "draw something random," it might draw a circle today and a square tomorrow. But what if you want the robot to draw the same "random" thing every time you say the word "Apple"?
That is what a Seed does. The algorithm takes a word (like a project name or a date), turns it into a number, and uses that number to make every "random" choice. Because the starting number is the same, the result is always the same. This is why "Project A" always has its own unique, permanent visual identity.
How it generates symbols
The component uses a "Bauhaus Grid" logic to create symbols. Here is the step-by-step:
- The Grid: It divides a square into a 5x5 grid.
- The Coin Flip: For each square in the grid, it flips a digital coin to decide if it should draw something there.
- The Shape: If it decides to draw, it picks one of four shapes: a square, a circle, a quarter-circle, or a triangle.
- The Twist: It rotates the shape by 0, 90, 180, or 270 degrees.
- The Color: It picks colors from a palette generated based on the same seed.
By combining these simple rules, the algorithm creates complex, balanced symbols that look like modern art but are just math in disguise.
The Laboratory: BlendLab
While GenerativeArt is about sharp geometry, BlendLab is about atmosphere and "vibe." It uses a coordinate-based system to create abstract color fields.
In BlendLab, you position different "entities" (points of color) on a digital canvas. The algorithm then applies heavy Gaussian blurs and noise filters. This blends the distinct points into a smooth, flowing gradient. When combined with high-impact typography, it creates a style often seen in modern "Brutalist" design.
The Creative Suite
Beyond these two, Fezcodex houses several other specialized art generators:
- Topographic Maps: Uses "Perlin Noise" (a type of smooth, natural-looking randomness) to create height maps. By drawing lines at specific height levels, it creates the look of a physical map.
- Abstract Waves: Uses Trigonometry (Sine and Cosine waves). By layering multiple waves with slight offsets and adding a "noise" distortion, it generates 3D-looking landscapes reminiscent of retro album covers.
- Fractal Flora: Uses "Recursion"—a function that calls itself. To draw a tree, the code draws a trunk, then tells itself to "draw two smaller branches at the end," and repeats this until a full, organic-looking tree is formed.
- Spirograph: Uses the classic math of hypotrochoids and epitrochoids. It tracks the path of a point on a circle rolling inside or outside another circle.
Conclusion
Code is often seen as cold and rigid, but when we introduce randomness and recursion, it becomes a brush. Fezcodex is a sandbox for these experiments, proving that the pursuit of code can indeed be an art form.