12 From picture to recipe
Write the recipe yourself
No options this time. Look at the target, say its recipe in five layers, then change the code until it matches.
ExerciseEdit code
Match the target: glowing small circles in a six-slice kaleidoscope, coloured by distance
Runs once per pixelDrag numbers, or edit the code
JS side
gl.uniform2f(uResolution, …, …)Say the recipe before you write: space (polar, folded into 6 slices), shape (a small circle away from the centre), edge (glow), paint (a palette driven by distance). If you can say the recipe, you can write the code, and you can tell an agent exactly what you want.
Try it
- Before writing code, describe the target in one sentence, layer by layer
- Start from the space layer and change one layer at a time, checking the picture each time
- Open the pixel debugger and show r, a, d and ink on the canvas one by one