Also known as the Ulam spiral, this is a quick one-off to try my hand at a programming challenge I saw the introduction to on YouTube, and I find the pattern generated rather fascinating. It draws a pixel spiral of a number line where all prime numbers are colored black.
The variable pointScale
may be customized in src/index.ts to change the visualization size.
- Run the following:
npm install
npm run dev
- View the visualization at the url printed in the console