home/ atoms/ 2d-noise-grid-displacement

A 2D Perlin noise field can displace every point in a regular grid to create organic cloud-like structure

When a regular x–y grid is iterated and each point is displaced by noise(xnoise, yNoise), the result is a field of shapes that clusters organically — dense where noise values are high, sparse where they are low. The two-dimensional noise call takes separate coordinates for x and y and must be advanced independently (ynoise advances per row, xnoise resets per row to a shared xstart). Both the displacement and the size of each shape can be driven by the same noise value, reinforcing the organic effect. This is the foundational technique behind many generative ‘particle field’ aesthetics.

Examples

ch1_listing_i1v00.pde: a nested loop iterates over y and x, advancing ynoise and xnoise by 0.02 each step, then calls drawPoint(x, y, noise(xnoise, ynoise)) to translate and size each ellipse by the noise factor.

Assessment

Describe what would change visually if you replaced the 2D noise call with a 1D call (same value for every point in a row). Then modify the sketch so each ellipse’s opacity also scales with the noise factor.

“translate(x * noiseFactor * 4, y * noiseFactor * 4, -y); float edgeSize = noiseFactor * 26;”
corpus · generative-art-code-examples-josephfiola-genart-processing-p · chunk 3
“float xstart = random(10); float ynoise = random(10); translate(width/2, height/2)”
corpus · generative-art-code-examples-josephfiola-genart-processing-p · chunk 4
“float div = 2; float scale = 20; float noiseAmt = 0.01;”
corpus · generative-art-code-examples-josephfiola-genart-processing-p · chunk 5