Creating the Cutout Shapes • tim rodenbröker creative coding

Creating the Cutout Shapes

Courses / Generative Collages / Creating the Cutout Shapes

Let’s begin by crafting our cutout shapes!
In this lesson, we’ll use the curveVertex()-function to create organic forms. These shapes will serve as the building blocks for our generative collages.

Processing

void setup() {
  size(900, 900);
  frameRate(1);
}

void draw() {
  background(#ffffff);

  fill(0);
  noStroke();

  translate(width/2, height/2);

  float mag = 500;

  beginShape();
  for (int i = 0; i < 6; i++) {
    float x = random(-mag, mag);
    float y = random(-mag, mag);

    curveVertex(x, y);
  }

  endShape(CLOSE);
}

p5.js (by Yassine Boudriga)

function setup() {
  createCanvas(900, 900);
  frameRate(1);
}

function draw() {
  background('#ffffff');
  
  fill(0);
  noStroke();

  translate(width/2, height/2);

  let mag = 500;
  
  beginShape();
  for(let i = 0; i < 6; i++){
    let x = random(-mag,mag);
    let y = random(-mag,mag);

    curveVertex(x,y);
  }

  endShape(CLOSE);
}

Published by Tim on Tuesday February 4, 2025

Last modified on February 17th, 2025 at 17:04

  1. Intro
  2. Creating the Cutout Shapes
  3. Masking an Image
  4. Layering the Cutout Images
  5. Curation
  6. Animation
  7. Programmatically load all Images from a Folder
  8. Example Generator 1
  9. Example Generator 2
  10. Example Generator 3
  11. Wrapping Up