News for hackers. Stuff that matters.
Re:Ulam Spiral by gbh444g on Saturday August 07, 2021 @01:17AM (#28095926)
Are there large Ulam spirals? e.g. 100k x 100k, where each pixel is the density of prime numbers there. Do they show any interesting structure?
Re:Ulam Spiral by zamadatix on Saturday August 07, 2021 @11:05AM (#28099086)
Sure, largely similar patterns just more zoomed out. There are well known ways to generate a coordinate conversion e.g. from http://www.survo.fi/demos/index.html#ex51

  x(n)=x(n-1)+sin(mod(int(sqrt(4*(n-2)+1)),4)*pi/2)
  y(n)=y(n-1)-cos(mod(int(sqrt(4*(n-2)+1)),4)*pi/2)
Which can make something like generating enormous spirals very quick with a simple GPU shader.