In this post I will explain the generative art techniques used to create "Woobles". First, I will explain the math behind a single Wooble. Then I'll discuss stacking Woobles including shape and color selection. Finally, I'll discuss the post-processing on the image to get the final framing and texture.
Keywords:
- Generative Art. Art that in whole or in part has been created with the use of an autonomous system (wikipedia).
- Programming. The act of instructing computers to perform tasks (wikipedia).
"Wobbly Ringz" by jawknee400 (source)
I saw this image on /r/generative and was immediately taken by it. I resolved to recreate it using a software library that I've wanted to learn called diagrams.
diagrams is a powerful, flexible, declarative domain-specific language for creating vector graphics, using the Haskell programming language.
A useful definition of a circle is in the polar coordinate system where the points of the circle are specified as a function of the angle:
On the left is a unit circle (
The
@TODO: Interactive Visualization
The final image is a stack of Woobles. In this section, I'll discuss what was done to make the stacking interesting in terms of Wobbles and Colors.
If we use the same Wobble for every Wooble, we get concentric Woobles.
Technically, the Wobbles only share the same frequency and phase. The magnitude of the Wobbles are getting bigger as the radius increases i.e. magnitude is a function of a radius
To achieve the final result:
-
$M(r) = \frac{r}{75}$ for all Woobles -
$P=p$ where$p$ $\epsilon$ $[\frac{\pi}{4}, \pi]$ -
$F = f$ where$f$ $\epsilon$ $[4, 8]$
The colors for Woobles are sampled from the Hue, Saturation, and Luminosity (HSL) color space. Specifically I use the randomColor
function from the Haskell package palette
(link). It takes a Hue and a Luminosity range (LumBright
, LumLight
, and LumDark
) and samples a color.
Three sets of colors are generated: colors with bright luminosity, colors with light luminosity, and colors with dark luminosity. For each Wooble, one of these sets is sampled for a color. The bright colors are used as accents and have a constant probability of
Lighter colors appear more often closer to the center of the image and darker colors appear more often towards the ends of the image. To achieve this the probability of light colors is
In this image, the light and dark colors are sampled from HueBlue
and the bright bolors are sampled from HueRandom
After the shaping and coloring of the Woobles, I select a particular region of the image. I liked the regions where you cannot see an entire Wooble because it directs attention towards the interaction between Woobles. In the case of the image at the top of this post, it is roughly the bottom left quadrant of the image.
Everything until this point was done in Haskell using the diagrams library. The final touch was to add some Gaussian noise to give the piece materiality. I used the freely available imagemagick program and the exact command can be found in the repo in addNoise.sh
.