Published On Feb 20, 2022
š» Code: https://thecodingtrain.com/challenges...
āØ Watch the uncut version on Nebula! https://nebula.tv/videos/codingtrain-...
āØ Watch this video ad-free on Nebula! https://nebula.tv/videos/codingtrain-...
Why do prime numbers show up as diagonals in a spiral? In this video, I create a visualization in JavaScript (p5.js) of the Ulam Spiral (aka Prime Spiral) named for Polish Mathematician Stanislav Ulan.
p5.js Web Editor Sketches:
š¹ļø Prime (Ulam) Spiral: https://editor.p5js.org/codingtrain/s...
š¹ļø Number Spiral: https://editor.p5js.org/codingtrain/s...
š¹ļø Prime vs Random Spiral: https://editor.p5js.org/codingtrain/s...
š¹ļø Shapes & Color: https://editor.p5js.org/codingtrain/s...
š¹ļø Incorporating 3D: https://editor.p5js.org/codingtrain/s...
š„ Previous video: Ā Ā Ā ā¢Ā CodingĀ ChallengeĀ 166:Ā ASCIIĀ TextĀ ImagesĀ Ā
š„ Next video: Ā Ā Ā ā¢Ā CodingĀ ChallengeĀ 168:Ā MandelBulbĀ 3DĀ F...Ā Ā
š„ All videos: Ā Ā Ā ā¢Ā CodingĀ ChallengesĀ Ā
References:
šŗ CodingTrainChooChoo on Twitch: Ā Ā /Ā codingtrainchoochooĀ Ā
2ļøā£ Mathematical Games: The remarkable lore of the prime numbers (1964): https://www.scientificamerican.com/ar...
š An Observation on the Distribution of Primes, M. Stein and S. M. Ulam: https://doi.org/10.2307/2314055
š Prime Numbers (Wikipedia): https://en.wikipedia.org/wiki/Prime_n...
š List of Prime Numbers: https://en.wikipedia.org/wiki/List_of...
š Download Processing 4: https://processing.org/download
Videos:
š„ Prime Spirals: Ā Ā Ā ā¢Ā PrimeĀ SpiralsĀ -Ā NumberphileĀ Ā
š¶ Processing Theme Selector music by Ā Ā /Ā willfromamericaĀ Ā
Timestamps:
0:00 Welcome! Choo choo!
0:23 History of the Ulam Spiral
1:16 Diagramming the Spiral
2:18 Starting to Code
3:25 How and when do I rotate?
4:25 Coding the number spiral
7:00 Debugging!
9:40 Visualizing the spiral
12:22 What is a prime number?
14:31 Code to check if a number is prime.
18:57 Marking primes in the spiral
19:40 Porting to Processing (Java)
22:46 More references & examples
Editing by Mathieu Blanchette
Animations by Jason Heglund
Music from Epidemic Sound
š Website: http://thecodingtrain.com/
š¾ Share Your Creation! https://thecodingtrain.com/guides/pas...
š© Suggest Topics: https://github.com/CodingTrain/Sugges...
š” GitHub: https://github.com/CodingTrain
š¬ Discord: https://thecodingtrain.com/discord
š Membership: http://youtube.com/thecodingtrain/join
š Store: https://standard.tv/codingtrain
šļø Twitter: Ā Ā /Ā thecodingtrainĀ Ā
šø Instagram: Ā Ā /Ā the.coding.trainĀ Ā
š„ Coding Challenges: Ā Ā Ā ā¢Ā CodingĀ ChallengesĀ Ā
š„ Intro to Programming: Ā Ā Ā ā¢Ā StartĀ learningĀ here!Ā Ā
š p5.js: https://p5js.org
š p5.js Web Editor: https://editor.p5js.org/
š Processing: https://processing.org
š Code of Conduct: https://github.com/CodingTrain/Code-o...
This description was auto-generated. If you see a problem, please open an issue: https://github.com/CodingTrain/thecod...
#primenumbers #p5js #javascript