Rebecca Ramnauth's profile

Algorithmic Portrait with p5.js

Algorithmic Portrait with p5.js​​​​​​​
function draw() {
  if (!isStop) {
    for (var i = 0 ; i < subStep ; i++) {
      paint.update();
      paint.show();
      z+= 0.01;
    }
  }
  count++;
  if (count > width) {
    isStop = true;
  }
}

function fget(i, j) {
  var index = j * img.width + i;
  index *= 4;
  return color(img.pixels[index], img.pixels[index+1], img.pixels[index+2], img.pixels[index+3]);
}

function fset(i, j, c) {
  var index = j * img.width + i;
  index *= 4;
  img.pixels[index] = red(c);
  img.pixels[index+1] = green(c);
  img.pixels[index+2] = blue(c);
  img.pixels[index+3] = alpha(c);
}
Tools: algorithmic { javascript, p5.js }, display { html/css }, touch up { Adobe Illustrator }
Feel free to reach out for the project code and reference image.
Rebecca Ramnauth · Ph.D. Computer Science @yale · @rramnauth2220

Algorithmic Portrait with p5.js
Published:

Owner

Algorithmic Portrait with p5.js

Published: