In this multi-part coding challenge, I demonstrate how to use a circle packing algorithm. Code: thecodingtrain.com/challenges...
p5.js Web Editor Sketches:
🕹️ Animated Circle Packing - Text: editor.p5js.org/codingtrain/s...
🕹️ Animated Circle Packing - Image: editor.p5js.org/codingtrain/s...
🎥 Previous video: • Coding Challenge #49: ...
🎥 Next video: • A* Pathfinding Algorit...
🎥 All videos: • Coding Challenges
References:
💻 Various Circle Packing Tutorials: julienleonard.com/tutorials.html
🗄 Circle Packing on Wikipedia: en.wikipedia.org/wiki/Circle_...
Videos:
🎥 Part 2: • Coding Challenge #50.2...
🎥 Livestream Archive: • Coding Train Live 71: ...
Related Coding Challenges:
🚂 #47 Pixel Sorting in Processing: • Coding Challenge #47: ...
Timestamps:
0:00 Introduction
0:47 Circle Packing by Marius Watz
1:09 Create a Circle class
3:06 Add show()
4:22 Create an ArrayList
5:34 Null pointer exception
6:26 Add a grow() function
6:52 Add an edges() function
9:25 Add new circles at random x, y
10:07 Only add valid circles
14:03 Check for overlapping circles
16:02 Make sure circle is not checking itself
20:53 Seed circles based on pixel color
22:06 Read the pixels of an image
23:30 Add circles based on brightness of pixel
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: / discord
💖 Membership: ru-vid.comjoin
🛒 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...
#loadpixels #circlepacking #processingpixels #processing
10 июл 2024