Uniform random dots distribution across a disc - the Maths behind

Опубликовано: 14 Октябрь 2024
на канале: Ana Tudor
724
like

Live demos:
a) line segment, circle & rectangle random distributions https://codepen.io/thebabydino/pen/NW...
b) random uniform disc distribution: incorrect vs. correct https://codepen.io/thebabydino/pen/Ex...

If the work I've been putting out since early 2012 has helped you in any way or you just like it, please consider supporting it to help me continue and stay afloat. You can do so in one of the following ways:

you can be a cool cat 😼🎩 and become a patron on Patreon   / anatudor  

you can make a one time donation via Ko-fi https://ko-fi.com/anatudor

you can make me happy by getting me a gift off my wishlist
🎁🇺🇸 https://www.amazon.com/hz/wishlist/ls...
🎁🇬🇧 https://www.amazon.co.uk/hz/wishlist/...

you can share this to show the world what can be done with CSS these days

Thank you!

---

Resources:

CSS Challenge #1/ January 2022 (https://codepen.io/challenges/2022/ja...)

Polar (r, θ) ➞ Cartesian (x, y) coordinates (https://codepen.io/thebabydino/full/K...)

square root graph on the [0, 1] interval (https://www.desmos.com/calculator/e08...)

00:00 Intro
00:28 Base HTML for introductory cases
01:37 Base styles
03:45 Uniform random distribution along a line segment
09:15 Uniform random distribution along a circle
13:08 Uniform random distribution across a rectangle
15:30 Uniform random distribution across a disk
23:27 Fin

#css #maths #algorithms