===== particle sim (Processing port) =====
| 44 | |
| 45 | // ===== particle sim (Processing port) ===== |
| 46 | struct P { |
| 47 | float x, y; // position |
| 48 | float a; // angle |
| 49 | int f; // direction (+1 or -1) |
| 50 | int g; // group (I in the original) |
| 51 | float s; // "stroke weight" / intensity |
| 52 | bool alive; // quick guard in case we want to reuse slots |
| 53 | }; |
| 54 | |
| 55 | static uint32_t t = 0; // frame-ish counter |
| 56 | static const int MAXP = 256; // fewer particles for small grids |