xxxxxxxxxx
43
/*
Voir découpes horizontales (v0-1) https://editor.p5js.org/Anne-Laure/sketches/E_h5qv4Vl
image source = https://pixabay.com/fr/photos/mode-femme-portrait-maquette-fille-3080644/
pour en trouver d'autres taper femme, homme ou visage ou portrait dans la recherche de pixabay
source du programme de découpe https://www.youtube.com/watch?v=-YS5t1R-GO8
*/
let img ;
function preload() {
img = loadImage("assets/femme1.jpg") ;
}
function setup() {
createCanvas(600, 400);
noLoop() ;
}
function draw() {
background(220);
img.resize(height,0) ;
// image (img, 0, 0 ) ;
/*
let leftCorner = img.get(0, 0, img.width/2, img.height/2 ) ;
image( leftCorner, width/2, height/2 ) ;
*/
for ( let x = 0; x < img.width; x += 10 ) {
let stripXPosition = int( random( 0, img.width - 10 ) ) ;
let strip = img.get(stripXPosition, 0, 10, img.height) ;
image(strip, x, 0 ) ;
}
}