

def draw():
    background(0)
    for row in range(rows):
        for col in range(columns):
            x = ((cellsize * col) + (cellsize / 2))
            y = ((cellsize * row) + (cellsize / 2))
            loc = (x + (y * img.width))
            c = img.pixels[loc]
            z = (((mouseX / float(width)) * brightness(img.pixels[loc])) - 20.0)
            pushMatrix()
            translate((x + 200), (y + 100), z)
            fill(c, 204)
            noStroke()
            rectMode(CENTER)
            rect(0, 0, cellsize, cellsize)
            popMatrix()

dataset/ETHPy150Open jdf/processing.py/examples.py/3D/Image/Explode.py draw/original