The code for this artwork is as follows:
let img;
let cnv;
function preload(){
img = loadImage("her.png")
}
//only run once
function setup() {
cnv = createCanvas(img.width, img.height);
//print(img.width, img.height)
//acess the pixel info of image
for(let col = 0; col <img.width; col+=10){
for(let row = 0; row <img.height; row+=10){
let xPos = col;
let yPos = row;
let c = img.get(xPos, yPos);
push();
translate(xPos, yPos);
noFill();
strokeWeight(random(7));
stroke(color(c))
//curve(x1, y1, x2, y2, x3, y3, x4, y4)
curve(xPos, yPos, sin(xPos) * 60, cos(xPos) * sin(xPos) * 40, 0, 0, cos(yPos) * sin(xPos) * random(140), cos(xPos) * sin(xPos) * 50)
pop();
}
}
}