Uniform random dots distribution on/ throughout a sphere - the Maths behind

Опубликовано: 25 Октябрь 2024
на канале: Ana Tudor
1,972
like

Live demos:
a) random uniform distribution across sphere surface https://codepen.io/thebabydino/pen/yL...
b) random uniform distribution throughout sphere volume https://codepen.io/thebabydino/pen/ab...

Note that these demos need individual transform properties to work, which requires having the **Experimental Web Platform features flag** enabled for Chromium browsers from `chrome://flags/`.

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...)

Random uniform distribution on a disc: video (   • Uniform random dots distribution acro...   demo (https://codepen.io/thebabydino/pen/Ex...)

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

Spherical coordinates (https://en.wikipedia.org/wiki/Spheric...)

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

acos graph on the [-1, 1] interval (https://www.desmos.com/calculator/rwy...)

#css #maths #algorithms