Skip to content

LMicol/prime-spiral-numbers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 

Repository files navigation

3Blue1Brown - Dirichlet’s theorem and pi approximations

I've seen "Why do prime numbers make these spirals?" video from 3Blue1Brown and decided to replicate the visual effect of the start of the video.

 3Blue1Brown


How to run it

To run this code install the requirements:

$ pip install -r requirements.txt

and execute:

$ python main.py


Previews

Demo video **Speeded up!!**
spiral-compacted.mp4
Different parameters for the markers
Marker '1' Marker '.' Marker 's'

Extra

You can change parameters such as colors and the marker at the start of the code. There are a bunch of optimizations that can be done for this code to be faster, feel free to do so.

Also, the correct marker should be "s", but the plot looks awful with the squared marker, so I let the dot as default.

All of this code was made by myself.

About

Why do prime numbers make these spirals?

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages