This commit is contained in:
Jürg Hallenbarter
2026-04-01 11:28:05 +00:00
parent 10c9cad0a6
commit 3f9de9c266
13 changed files with 336 additions and 158 deletions

41
sketches/2images.js Normal file
View File

@@ -0,0 +1,41 @@
function preload() {
img1 = loadImage('assets/wallpaper/dear.png');
img2 = loadImage('assets/wallpaper/elphantJap.jpg');
}
function setup() {
createCanvas(img1.width, img1.height);
background(255,255,255)
//image(img1, 0, 0);
for (let col = 0; col < img1.width; col += 1) {
for (let row = 0; row < img1.height; row += 1) {
let c = img1.get(col, row);
if (col%2 == 0){
stroke(color(c));
strokeWeight(1);
point(col, row);
}
}
}
for (let col = 0; col < img2.width; col += 1) {
for (let row = 0; row < img2.height; row += 1) {
let c = img2.get(col, row);
if (col%2 == 1){
stroke(color(c));
strokeWeight(1);
point(col, row);
}
}
}
}
function draw() {
}
function mousePressed(){
}