p5.js

Experiment Coding

In a week-long exploration of generative art using the p5.js library, I created a visually captivating and dynamic piece. Drawing inspiration from natural patterns and organic forms, I sought to capture the essence of complexity and randomness in a controlled and intentional manner.

Using p5.js, I implemented a variety of algorithms and techniques to generate unique and ever-evolving compositions. One of the focal points of my artwork was the utilization of fractal geometry. By recursively applying mathematical functions, I crafted intricate patterns that exhibited self-similarity at different scales, creating a mesmerizing effect.

 

Batik

Using p5.js to create a generative and animated design. Drawing inspiration from the traditional art form, I aimed to capture the mesmerising patterns and vibrant colours that define batik.

*Every time the webpage is refreshed, it will regenerate a different pattern and colour.

				
					let url = "https://coolors.co/6eff4d-4ae1bd-FF77A7-ffe817-ffffff";
let palette = url
  .split("/")[3]
  .split("-")
  .map((c) => "#" + c);
let r0, r1, r3;

function setup() {
  createCanvas(800, 800);
  noStroke();

  palette = shuffle(palette);
  palette.splice(0, 1);

  r0 = random(1, 10);
  r1 = random(2, 4);

  distance = random(10, 50);
}

var distance = 20;

function draw() {
  let c0 = palette[2];
  let c1 = palette[2 + 1];

  background(c0);
  for (var x = 0; x <= width; x += distance) {
    for (var y = 0; y <= height; y += distance) {
      var siz = distance * sin(frameCount / 30 + x / r1 + y / 8) + r0;
      rect(x - siz / 2, y - siz / 2, siz, siz, 2);
      fill(c1);
    }
  }
}

				
			

Kuih Lapis

In my p5.js artwork inspired by the vibrant Peranakan culture and their delicious kuih lapis, I aimed to capture the essence of this traditional dessert through a visually enticing representation. Drawing inspiration from the intricate layers and vibrant colors of the kuih lapis, my artwork showcases a dynamic composition that echoes the texture and allure of this culinary delight.

Flower

I explored the concept of a generative flower, where I aimed to create an intricate and visually captivating representation of a blossoming flower through code. Drawing inspiration from the beauty and complexity of nature, I utilized algorithms and randomness to generate unique and ever-evolving flower designs.

 

Painting Inspiration

I drew inspiration from the captivating Peranakan paintings that showcase colorful birds against a vibrant blue background. With this influence, I aimed to recreate the beauty and charm of these traditional artworks through a digital medium.

Using p5.js, I carefully crafted a rich blue background that serves as the foundation for the artwork. The hue and saturation of the blue were meticulously chosen to mimic the deep and mesmerizing shades often seen in Peranakan paintings. The background provides a visually striking canvas against which the colorful bird will come to life.