Deconstructing a shape into steps enables naturalistic variance at each step
Instead of using Processing’s built-in shape functions (which draw perfect geometric forms), you can break a shape into many small steps and add variation to each step. For a line: instead of line(x1,y1,x2,y2), iterate through x positions in small steps and draw micro-segments, displacing y slightly at each step. This ‘deconstruct, then reconstruct with imperfection’ technique is the foundational generative art procedure Pearson describes. It works for any shape: lines, circles (via trigonometry), spirals. The variation added at each step can be random, noise-based, or a mathematical function like sin. This gives fine-grained control over how much organic imperfection is introduced.
Examples
Straight line deconstructed: iterate x from 20 to 480 in steps of 10, at each step vary y by ±10 with y += random(20)-10, draw micro-segment back to previous point. Circle deconstructed: use x = centX + radius*cos(rad); y = centY + radius*sin(rad) at each angle, vary radius with noise.
Assessment
Given a Processing sketch that draws a perfect rectangle using rect(), rewrite it using iterative variance so each side exhibits slight random displacement, and explain the key change made.