xxxxxxxxxx
31
let img;
let rInt = 1;
function preload() {
img = loadImage('flower1.png')
}
function setup() {
createCanvas(400, 400);
pixelDensity(2);
img.resize(height,width)
noStroke();
}
function draw() {
background(0)
//image(img,0,0);
let steps = 3
for(let y = 0; y < height; y+=steps) {
for(let x = 0; x < width;x+=steps) {
let c = img.get(x,y)
fill(c)
circle(x,y,steps)
}
}
}