Each particle is placed by a logarithmic-spiral distribution, the same shape real barred/spiral galaxies follow: a random radius r (biased toward the core), an arm offset 2πk/arms, and a spin term that winds the angle further out with radius:
angle = armOffset + spin·r + jitter
x = r·cos(angle), y = r·sin(angle)
Colour is interpolated core→white, mid→violet, outer→blue by normalized radius, matching the temperature/density gradient of a real disk galaxy (hot young stars cluster near the bright core). The nebula layer draws soft additive-blended blobs orbiting slower than the stars, echoing differential rotation. This is the same generator formula as the 3D version, viewed top-down on a flat canvas instead of orbited in WebGL.