Explore

2024-03-15

The Making of "BitLocked": An Exploration of Shape Packing

BitLocked is a captivating exploration into the complex interplay between geometry and artistry. This generative art piece marries mathematical precision with the unpredictability of natural forms, creating a landscape that feels both structured and spontaneously alive. Let's delve into the intricate process that gives birth to such a unique visual experience. – Tezzumie

The Making of "BitLocked": An Exploration of Shape Packing

BitLocked reflects the interplay of shapes and structures within the piece, embodying the foundational concept of recursive shape packing

The artwork navigates the balance between rigid, mathematical division of space and the organic, unpredictable effects of noise.

Beginning with Basic Shape Packing

The foundation of "BitLocked" lies in the concept of recursive shape packing. This technique starts with a simple rectangle, which is then divided repeatedly into smaller sections. This process incorporates a level of controlled randomness, allowing for an irregular, yet harmonious, pattern to emerge.

This initial phase is critical as it sets the framework for the entire piece. By adjusting parameters such as the angle and ratio of division, the artist can steer the direction of the visual narrative, from starkly geometric to subtly organic.

Transitioning to Isometric Design

Once the base layer of shapes is established, the artwork begins to take on a new dimension—literally. By skewing the grid into an isometric perspective, "BitLocked" starts to mimic the complexities of a three-dimensional space on a flat surface. This transformation is meticulous; each point of the original grid is shifted to create an illusion of depth and volume, challenging the viewer's perception.

Infusing Noise and Colors

The true essence of "BitLocked" emerges in the stages of noise application. The once rigid grid becomes distorted, introducing an element of organic unpredictability to the composition.

Grid Distortion:

By misaligning the grid points, the artwork acquires an organic feel. The precise calculations behind this ensure that the structure remains coherent while boasting a natural variance.

Height Variation:

The illusion of depth is further enhanced by altering the vertical dimensions of each grid section. This step is pivotal as it transforms flat shapes into three-dimensional blocks, providing the piece with its distinct metropolis-like appearance.

Color and Light:

The careful selection of color palettes adds another dimension to "BitLocked." By choosing shadows with a hint more blue, there's a natural transition between colors, enhancing the overall appearance. All the color schemes are chosen to complement each other, ensuring a unified look throughout the entire collection.

Pattern Integration:

Instead of applying traditional textures, "BitLocked" incorporates a series of patterns atop wavy lines, designed to further disrupt the rigidity of the original grid. This method does not merely add a tactile quality but instead transforms the perception of texture through visual cues, further enhancing the piece's complexity and inviting viewers to lose themselves in its details.

Trait Diversity

In Bitlocked, numerous traits are integrated to give each version its own distinct appearance. These include view (perspective), colorDistribution, recursionDepth, noiseScale, among others. By varying these traits, each piece in the collection presents a unique aesthetic and feel, ensuring no two versions are exactly alike.

Technical Underpinnings

Bitlocked was developed using the AIJS code editor and incorporates the p5.js library. Below, you'll find individual code snippets and their explanations, which provide insight into a simplified prototype that was initially created and then used as a template for the final version of Bitlocked.

Setup Function:

This function initiates the canvas where the drawing will take place and selects a random color palette from a predefined set.

function setup() {
    createCanvas(800, 1000);
    selectedPalette = random(colorPalettes);
    noLoop();
}

Draw Function:

Here is where the main drawing occurs, setting the background and initiating the recursive rectangle drawing process.

function draw() {
    background(255);
    drawRecursiveRects(-width / 2, -width / 2, width * 2.5, width * 2.5, 8);
}

Recursive Rectangle Drawing:

This function is the heart of the shape packing technique, breaking down larger rectangles into smaller, subdivided sections based on depth and noise.

function drawRecursiveRects(x, y, w, h, depth) {
    if (depth === 0 || w < 5 || h < 5) return;
    let noiseScale = 0.01;
    let noiseValue = noise(x * noiseScale, y * noiseScale) * 150;
    let isoOffsetX = noiseValue * cos(PI / 4);
    let isoOffsetY = noiseValue * sin(PI / 4);
    ...
}

(Note: The ellipsis "..." indicates the continuation of code which includes the detailed drawing logic and recursive calls.)

Isometric view:

The conversion to isometric view is done with this simple function, along with adding two more shapes to represent the other faces, giving an illusion of 3d blocks.

  function isoTransform(x, y) {
    let isoX = x - y + width / 2;
    let isoY = (x + y) / 2;
    return createVector(isoX, isoY);
  }

In Conclusion

"BitLocked" invites you to discover the surprising beauty that arises from starting with a simple concept and using code. It demonstrates how art and programming can merge to create something truly beautiful. As you embark on your creative projects, keep in mind that the real beauty of generative art is found in the journey, not just the end result. Embrace the unexpected, play with different settings, and most importantly, enjoy the process of realizing your unique vision.

Create your own

Engage directly with the art by altering its very fabric. Use this interactive editor to create a piece that resonates with your personal aesthetic.

<!-- Custom Embed --> <iframe src="https://aijs-code-editor.web.app/editor?user=Tezumie&project=Isometric_Recursion_Template&mode=editor&fontSize=12px&previewSize=50&theme=genify_dark" width="800" height="600"></iframe>