I ran throughout a graphic yesterday made by taking a sequence of steps of the identical size, turning left on the nth step if n is prime, and in any other case persevering with in the identical route.
Right here’s my recreation of the primary 1000 steps:
You’ll be able to see that usually it makes lots of turns at first after which turns much less usually because the density of primes thins out.
I questioned what the analogous stroll would appear like for Fizz Buzz. There are a number of variations on Fizz Buzz, and the one which produced essentially the most fascinating visualization was to show left when a quantity both is divisible by 7 or accommodates the digit 7.
Right here’s what that appears like:
I wrote about one thing related four years ago utilizing a unique rule for turning. That submit seems to be at a stroll on the complicated numbers, turning left if you land on a Gaussian prime, a generalization of primes for complicated numbers. These photographs have extra symmetry and type closed loops. For instance, right here’s the stroll you get beginning at 3 + 5i.
The start line issues. See the sooner submit for extra examples with completely different beginning factors.