Coding Challenge #97: The Book of Pi - Part 1
In yet another “Pi Day” coding challenge, I attempt to generate a pdf “Book of Pi” with the first 10 million digits of Pi mapped to color. Processing (Java) is used for this project. Code: https://thecodingtrain.com/challenges/97-book-of-pi
Other Parts of this Challenge:
📺 Part 2: The Book of Pi: https://youtu.be/4Ns9S-Z89-0
🎥 Previous video: https://youtu.be/WEd_UIKG-uc?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH
🎥 Next video: https://youtu.be/OJxEcs0w_kE?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH
🎥 All videos: https://www.youtube.com/playlist?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH
References:
🥧 1 Billion Digits of Pi: https://stuff.mit.edu/afs/sipb/contrib/pi/
🥟 10 Million Pi Digits: https://introcs.cs.princeton.edu/java/data/pi-10million.txt
🍰 Million Pi Digits: http://www.piday.org/million/
🗒️ Pi Day Code: https://github.com/CodingTrain/Pi-Day-2018
Videos:
🎥 Polar to Cartesian: https://www.youtube.com/watch?v=O5wjXoFrau4
⚙️ Learning Processing: https://www.youtube.com/playlist?list=PLRqwX-V7Uu6ZYJC7L-r6rX6utt6wwJCyi
🔴 Live Stream Archive: https://youtu.be/QYUROUJk_Sc?t=457s
Related Coding Challenges:
🚂 #21 Mandelbrot Set with p5.js: https://youtu.be/6z7GQewK-Ks
🚂 #156 Peeking Inside Pi: https://youtu.be/MEdpRYyjz_0
🚂 #161 Estimating π from Random Numbers with Euclid's Algorithm: https://youtu.be/EvS_a921dBo
🚂 #169 Pi in the Sky Game: https://youtu.be/_H9JIwWP7HQ
🚂 #140 Leibniz Formula for Pi: https://youtu.be/uH4trBNn540
🚂 #141 Calculating Digits of Pi with Mandelbrot Set: https://youtu.be/pn2vlselv_g
🚂 #139 Calculating Digits of Pi with Collisions: https://youtu.be/PoW8g67XNxA
🚂 #96 Visualizing the Digits of Pi: https://youtu.be/WEd_UIKG-uc
🚂 #95 Approximating the Value of Pi: https://youtu.be/5cNnf_7e92Q
Timestamps:
0:00 Introduction
1:40 A system to render a grid
3:10 Representing each digit of Pi as a color
5:10 Debugging
6:00 Writing the digit in the grid for debugging
8:11 The PDF Export in Processing
10:30 How big can we make this?
12:25 More debugging
13:41 Trying with a larger window size
14:45 An offscreen graphics buffer
19:15 Out of memory!
20:46 Using HSB mode
23:39 Tada!
24:06 Going back to PDF-land
27:28 An interesting point about hue
27:48 Rendering the million digits in PDF
28:35 Rendering with multiple pages!
33:20 Trying it with 10 million digits
36:03 Thank you for watching!
Editing by Mathieu Blanchette
Animations by Jason Heglund
Music from Epidemic Sound
🚂 Website: http://thecodingtrain.com/
👾 Share Your Creation! https://thecodingtrain.com/guides/passenger-showcase-guide
🚩 Suggest Topics: https://github.com/CodingTrain/Suggestion-Box
💡 GitHub: https://github.com/CodingTrain
💬 Discord: https://thecodingtrain.com/discord
💖 Membership: http://youtube.com/thecodingtrain/join
🛒 Store: https://standard.tv/codingtrain
🖋️ Twitter: https://twitter.com/thecodingtrain
📸 Instagram: https://www.instagram.com/the.coding.train/
🎥 Coding Challenges: https://www.youtube.com/playlist?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH
🎥 Intro to Programming: https://www.youtube.com/playlist?list=PLRqwX-V7Uu6Zy51Q-x9tMWIv9cueOFTFA
🔗 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-of-Conduct
This description was auto-generated. If you see a problem, please open an issue: https://github.com/CodingTrain/thecodingtrain.com/issues/new
#pi #piday #visualization #processing #java