Process
PImage img;
void setup() {
size(1728, 2160, P3D);
img = loadImage("shoe3.jpg");
}
size(1728, 2160, P3D);
img = loadImage("shoe3.jpg");
}
void draw() {
background(#E1EAEE);
fill(#2A315C);
noStroke();
sphereDetail(3);
float tiles = 200;
float tileSize = width/tiles;
push();
translate(width/2,height/2);
rotateY(radians(frameCount));
for (int x = 0; x < tiles; x++) {
for (int y = 0; y < tiles; y++) {
color c = img.get(int(x*tileSize),int(y*tileSize));
float b = map(brightness(c),0,255,1,0);
float z = map(b,0,1,-150,150);
push();
translate(x*tileSize - width/2, y*tileSize - height/2, z);
sphere(tileSize*b);
pop();
}
}
pop();
}
background(#E1EAEE);
fill(#2A315C);
noStroke();
sphereDetail(3);
float tiles = 200;
float tileSize = width/tiles;
push();
translate(width/2,height/2);
rotateY(radians(frameCount));
for (int x = 0; x < tiles; x++) {
for (int y = 0; y < tiles; y++) {
color c = img.get(int(x*tileSize),int(y*tileSize));
float b = map(brightness(c),0,255,1,0);
float z = map(b,0,1,-150,150);
push();
translate(x*tileSize - width/2, y*tileSize - height/2, z);
sphere(tileSize*b);
pop();
}
}
pop();
}