sleo-project-09
function preload() {
var myImageURL = "https://static.wixstatic.com/media/b109e8_9226598d042f4ca2b17fd70a4e0d7319~mv2.jpg/v1/fill/w_572,h_680,al_c,q_85,usm_0.66_1.00_0.01/b109e8_9226598d042f4ca2b17fd70a4e0d7319~mv2.webp";
IMG = loadImage(myImageURL);
}
function setup() {
createCanvas(480, 480);
background(0);
IMG.loadPixels();
frameRate(60);
imageMode(CENTER);
}
function draw() {
var px = random(width);
var py = random(height);
var ix = constrain(floor(px), 0, width-1);
var iy = constrain(floor(py), 0, height-1);
var rx = px + random(0,10); var ry = py + random(0,10); var rs = random(1,10); var theColorAtLocationXY = IMG.get(ix, iy);
strokeWeight(rs);
stroke(theColorAtLocationXY);
line(px,py,rx,ry);
}
Starting
Mid-render
Original Photo