9.8: Random Circles with No Overlap - p5.js Tutorial

Subscribers:
1,740,000
Published on ● Video Link: https://www.youtube.com/watch?v=XATr_jdh-44



Category:
Tutorial
Duration: 19:25
144,329 views
2,721


This video demonstrates a "circle packing"-like algorithm. Circles are placed randomly in the canvas, but only if they are not overlapping with any previous circles. This is referred to as "uniform random sampling." The p5.js dist() function is demonstrated.

Source-code: https://github.com/CodingTrain/Rainbow-Code

Contact: https://twitter.com/shiffman

All JavaScript/p5.js videos: https://www.youtube.com/user/shiffman/playlists?view=50&sort=dd&shelf_id=14

Help us caption & translate this video!

http://amara.org/v/Qbt2/

📄 Code of Conduct: https://github.com/CodingTrain/Code-of-Conduct







Tags:
JavaScript
programming
arrays
circle packing
tutorial
p5.js
daniel shiffman
javascript (programming language)
circles
js
p5
uniform random sampling
dist
distance