xxxxxxxxxx
147
function preload() {
img1 = loadImage('photo-1.jpg');
img2 = loadImage('photo-2.jpg');
img3 = loadImage('photo-3.jpg');
img4 = loadImage('photo-4.jpg');
img5 = loadImage('photo-5.jpg');
img6 = loadImage('photo-6.jpg');
img7 = loadImage('photo-7.jpg');
img8 = loadImage('photo-8.jpg');
img9 = loadImage('photo-9.jpg');
img10 = loadImage('photo-10.jpg');
img11 = loadImage('photo-11.jpg');
img12 = loadImage('photo-12.jpg');
img13 = loadImage('photo-13.jpg');
img14 = loadImage('photo-14.jpg');
img15 = loadImage('photo-15.jpg');
img16 = loadImage('photo-16.jpg');
img17 = loadImage('photo-17.jpg');
img18 = loadImage('photo-18.jpg');
img19 = loadImage('photo-19.jpg');
img20 = loadImage('photo-20.jpg');
img21 = loadImage('photo-21.jpg');
img22 = loadImage('photo-22.jpg');
img23 = loadImage('photo-23.jpg');
img24 = loadImage('photo-24.jpg');
img25 = loadImage('photo-25.jpg');
img26 = loadImage('photo-26.jpg');
img27 = loadImage('photo-27.jpg');
img28 = loadImage('photo-28.jpg');
img29 = loadImage('photo-29.jpg');
img30 = loadImage('photo-30.jpg');
img31 = loadImage('photo-31.jpg');
img32 = loadImage('photo-32.jpg');
img33 = loadImage('photo-33.jpg');
img34 = loadImage('photo-34.jpg');
img35 = loadImage('photo-35.jpg');
img36 = loadImage('photo-36.jpg');
img37 = loadImage('photo-37.jpg');
img38 = loadImage('photo-38.jpg');
img39 = loadImage('photo-39.jpg');
img40 = loadImage('photo-40.jpg');
img41 = loadImage('photo-41.jpg');
img42 = loadImage('photo-42.jpg');
img43 = loadImage('photo-43.jpg');
img44 = loadImage('photo-44.jpg');
img45 = loadImage('photo-45.jpg');
img46 = loadImage('photo-46.jpg');
img47 = loadImage('photo-47.jpg');
img48 = loadImage('photo-48.jpg');
img49 = loadImage('photo-49.jpg');
img50 = loadImage('photo-50.jpg');
img51 = loadImage('photo-51.jpg');
img52 = loadImage('photo-52.jpg');
img53 = loadImage('photo-53.jpg');
img54 = loadImage('photo-54.jpg');
img55 = loadImage('photo-55.jpg');
img56 = loadImage('photo-56.jpg');
img57 = loadImage('photo-57.jpg');
img58 = loadImage('photo-58.jpg');
img59 = loadImage('photo-59.jpg');
img60 = loadImage('photo-60.jpg');
img61 = loadImage('photo-61.jpg');
img62 = loadImage('photo-62.jpg');
img63 = loadImage('photo-63.jpg');
img64 = loadImage('photo-64.jpg');
img65 = loadImage('photo-65.jpg');
img66 = loadImage('photo-66.jpg');
img67 = loadImage('photo-67.jpg');
img68 = loadImage('photo-68.jpg');
img69 = loadImage('photo-69.jpg');
img70 = loadImage('photo-70.jpg');
img71 = loadImage('photo-71.jpg');
img72 = loadImage('photo-72.jpg');
img73 = loadImage('photo-73.jpg');
img74 = loadImage('photo-74.jpg');
img75 = loadImage('photo-75.jpg');
img76 = loadImage('photo-76.jpg');
img77 = loadImage('photo-77.jpg');
img78 = loadImage('photo-78.jpg');
img79 = loadImage('photo-79.jpg');
img80 = loadImage('photo-80.jpg');
img81 = loadImage('photo-81.jpg');
img82 = loadImage('photo-82.jpg');
img83 = loadImage('photo-83.jpg');
img84 = loadImage('photo-84.jpg');
img85 = loadImage('photo-85.jpg');
img86 = loadImage('photo-86.jpg');
img87 = loadImage('photo-87.jpg');
img88 = loadImage('photo-88.jpg');
img89 = loadImage('photo-89.jpg');
img90 = loadImage('photo-90.jpg');
img91 = loadImage('photo-91.jpg');
img92 = loadImage('photo-92.jpg');
img93 = loadImage('photo-93.jpg');
img94 = loadImage('photo-94.jpg');
img95 = loadImage('photo-95.jpg');
img96 = loadImage('photo-96.jpg');
img97 = loadImage('photo-97.jpg');
img98 = loadImage('photo-98.jpg');
img99 = loadImage('photo-99.jpg');
}
function setup() {
createCanvas(700, 700);
noStroke();
}
function draw() {
noFill();
s=int(random(2,15));
let portraits = [img51, img52, img53, img54, img55, img56, img57, img58, img59, img60, img61, img62, img63, img64, img65, img66, img67, img68, img69, img70, img71, img72, img73, img74, img75, img76, img77, img78, img79, img80, img81, img82, img83, img84, img85, img86, img87, img88, img89, img90, img91, img92, img93, img94, img95, img96, img97, img98, img99];
let landscapes = [img1, img2, img3, img4, img5, img6, img7, img8, img9, img10, img11, img12, img13, img14, img15, img16, img17, img18, img19, img20, img21, img22, img23, img24, img25, img26, img27, img28, img29, img30, img31, img32, img33, img34, img35, img36, img37, img38, img39, img40, img41, img42, img43, img44, img45, img46, img47, img48, img49, img50];
let photo1 = random(portraits);
let photo2 = random(landscapes);
let x1 = random(width / 2);
let y1 = random(height / 2);
let pix = photo2.get(x1, y1);
background(photo2);
//image(photo2,0,0,700,700);
for(x=int(random(0,500)); x<int((random(500,700))); x=x+s*2){
blend(photo1,x,0,s,700,x,0,s,700, NORMAL);
}
for(y=int(random(0,500)); y<int((random(500,700))); y=y+s*2){
blend(photo1,0,y,700,s,0,y,700,s, NORMAL);
}
fill(255,100);
rect(0,0,700);
noLoop();
}
function keyReleased() {
if (keyCode == ENTER || keyCode == RETURN) {
loop();
}
}