Рет қаралды 77,323
Happy Pi Day 2024! In this video, I attempt to create an Apollonian Gasket using the Descartes Circle Theorem and complex numbers. So many circles! Code: thecodingtrain.com/challenges...
🚀 Watch this video ad-free on Nebula nebula.tv/videos/codingtrain-...
p5.js Web Editor Sketches:
🕹️ Apollonian Gasket: editor.p5js.org/codingtrain/s...
🕹️ Colorful Recursive Gaskets in Gaskets: editor.p5js.org/codingtrain/s...
🎥 Previous: • Coding Challenge 181: ...
🎥 All: • Coding Challenges
References:
🔗 Apollonian Gasket: en.wikipedia.org/wiki/Apollon...
🔗 A Tisket, a Tasket, an Apollonian Gasket: www.americanscientist.org/art...
🔗 Apollonian Gaskets: mathlesstraveled.com/2016/04/...
🔗 Beyond the Descartes Circle Theorem: arxiv.org/pdf/math/0101066.pdf
🔗 The Kiss Precise: www.nature.com/articles/13710...
🔗 Frederick Soddy: en.wikipedia.org/wiki/Frederi...
🔗 Problem of Apollonius: en.wikipedia.org/wiki/Problem...
🔗 Four Proofs of a Generalization of the Descartes Circle Theorem: www.jstor.org/stable/2316373
🔗 Beyond the Descartes Circle Theorem: arxiv.org/pdf/math/0101066.pdf
🔗 Descartes' theorem: en.wikipedia.org/wiki/Descart...
🔗 Complex.js: www.npmjs.com/package/complex.js
Related Coding Challenges:
🚂 21 Mandelbrot Set with p5.js: • Coding Challenge #21: ...
🚂 22 Julia Set in Processing: • Coding Challenge #22: ...
🚂 77 Recursion: • Coding Challenge #77: ...
🚂 50 Circle Packing: • Coding Challenge #50.1...
🚂 95 Approximating the Value of Pi: • Coding Challenge 95: A...
🚂 96 Visualizing the Digits of Pi: • Coding Challenge #96: ...
🚂 97 The Book of Pi: • Coding Challenge #97: ...
🚂 139 Calculating Digits of Pi with Collisions: • Coding Challenge #139:...
🚂 140 Leibniz Formula for Pi: • Coding Challenge #140:...
🚂 141 Calculating Digits of Pi with Mandelbrot Set: • Coding Challenge #141:...
🚂 169 Pi in the Sky Game: • Coding Challenge 169: ...
🚂 176 Buffon's Needle: • Coding Challenge 176: ...
Timestamps:
0:00 Happy PI Day!!
1:40 References
3:22 Describe the Apollonian problem
5:51 Curvature
10:08 Start coding!
11:53 Write a function to find the fourth curvature
15:31 Complex numbers
21:11 Create a complex number class
22:52 Square root of -1
25:32 Square root of a complex number
27:57 Implement complex Descartes theorem
33:50 Make the circles in the complexDescartes function
36:26 Use an array to add recursion
41:04 Validate the circles
42:35 Check if all 4 circles are tangent
48:04 Stop adding circles when radius falls below a threshold
49:20 Implement arbitrary arrangement of circles
53:14 Debug
55:32 Possible variations
56:34 Outro
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: kzbin.infojoin
🛒 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...
#apolloniangasket #pi #circlepacking #complexnumbers #curvature #descartestheorem #p5js #javascript
=====================================================