Interpoler des dimensions
| Artiste | Œuvre | Année |
|---|---|---|
| Manfred Gräf | Semantische Geometrie | 1965 |
Compositions à partir de séries géométriques
const baseCellWidth = ceil(3 + random() * 5) * 8
const baseCellHeight = ceil(3 + random() * 5) * 8
const minCellWidth = baseCellWidth * 0.3
const maxCellWidth = baseCellWidth
const minCellHeight = baseCellHeight * 0.3
const maxCellHeight = baseCellHeight
const middle = width / 2
push()
scale(0.9)
translate(width * 0.05, height * 0.05)
let x = 0
let c = 0
while (x < width) {
const distFromCenterX = abs(middle - x) / middle;
const xResize = 1 - distFromCenterX * distFromCenterX
const nCellWidth = minCellWidth + (maxCellWidth - minCellWidth) * xResize
let y = 0
let r = 0
while( y < height) {
const distFromCenterY = abs(middle - y) / middle
const yResize = 1 - distFromCenterY * distFromCenterY
const nCellHeight = minCellHeight + (maxCellHeight - minCellHeight) * yResize
const cellToCenter = dist(x, y, middle, middle)
const nSide = min(nCellWidth, nCellHeight)
const xDecay = nCellWidth * map(x/width, 0, 1, 0.1, 0.9)
const yDecay = nCellHeight * map(y/height, 0, 1, 0.1, 0.9)
fill(50)
noStroke()
beginShape()
vertex(x + nCellWidth - xDecay, y)
vertex(x + nCellWidth - xDecay, y + nCellHeight)
vertex(x + nCellWidth, y + nCellHeight - yDecay)
vertex(x, y + nCellHeight - yDecay)
endShape(CLOSE)
noFill()
stroke(50)
rect(x, y, nCellWidth, nCellHeight)
y += nCellHeight
r++
}
x += nCellWidth
c++
}
pop()