Coding Challenge 167: Ulam Spiral of Prime Numbers
Вставка
- Опубліковано 2 тра 2024
- 💻 Code: thecodingtrain.com/challenges...
✨ Watch the uncut version on Nebula! nebula.tv/videos/codingtrain-...
✨ Watch this video ad-free on Nebula! 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: editor.p5js.org/codingtrain/s...
🕹️ Number Spiral: editor.p5js.org/codingtrain/s...
🕹️ Prime vs Random Spiral: editor.p5js.org/codingtrain/s...
🕹️ Shapes & Color: editor.p5js.org/codingtrain/s...
🕹️ Incorporating 3D: editor.p5js.org/codingtrain/s...
🎥 Previous video: • Coding Challenge 166: ...
🎥 Next video: • Coding Challenge 168: ...
🎥 All videos: • Coding Challenges
References:
📺 CodingTrainChooChoo on Twitch: / codingtrainchoochoo
2️⃣ Mathematical Games: The remarkable lore of the prime numbers (1964): www.scientificamerican.com/ar...
📓 An Observation on the Distribution of Primes, M. Stein and S. M. Ulam: doi.org/10.2307/2314055
🗄 Prime Numbers (Wikipedia): en.wikipedia.org/wiki/Prime_n...
🗄 List of Prime Numbers: en.wikipedia.org/wiki/List_of...
🔗 Download Processing 4: processing.org/download
Videos:
🎥 Prime Spirals: • Prime Spirals - Number...
🎶 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: thecodingtrain.com/
👾 Share Your Creation! thecodingtrain.com/guides/pas...
🚩 Suggest Topics: github.com/CodingTrain/Sugges...
💡 GitHub: github.com/CodingTrain
💬 Discord: thecodingtrain.com/discord
💖 Membership: ua-cam.com/users/thecodingtrainjoin
🛒 Store: standard.tv/codingtrain
🖋️ Twitter: / thecodingtrain
📸 Instagram: / the.coding.train
🎥 Coding Challenges: • Coding Challenges
🎥 Intro to Programming: • Start learning here!
🔗 p5.js: p5js.org
🔗 p5.js Web Editor: editor.p5js.org/
🔗 Processing: processing.org
📄 Code of Conduct: github.com/CodingTrain/Code-o...
This description was auto-generated. If you see a problem, please open an issue: github.com/CodingTrain/thecod...
#primenumbers #p5js #javascript