Visual Experiment 03 (Processing)

Tags:

A visual experiment using the work of the Mexican surrealist painter Leonora Carrington. What I aimed to do with this code was to generate an overlapping circular visual pattern, where the size of the circles changes depending on the mouse’s position on the X-axis.

A striking feature of this experiment is the use of nested patterns, which create an interesting effect when they overlap. As the size of the circles increases, it generates scale-like patterns. Although the main idea came from experimenting with small-sized circles, the pattern generated with the larger circles created an interesting effect.

Here is a sample of the code. Although it generates an interesting visual effect, it is important to mention its high resource consumption in the calculation and generation between each update of the circles’ size as you move along the X-axis.

void setup() {
  size(958, 658);
  background(0);
  frameRate(4);
}
void draw() {
  int size = 10;
  PImage img = loadImage("leonora_carrington.jpg");
    for (int x=0; x<width; x=x+size) {
      for (int y=0; y<height; y =y+size) {
        color c = img.get(x, y);
        fill(c);
        circle(x, y, mouseX/5);
    }
  }
}