Didn't get to do anything for this week's @codepen.io challenge yet, but here's an older demo: pure #CSS sphere of spheres codepen.io/thebabydino/...
#CodePenChallenge
Uses the spherical distribution tactic described 👇 then ensure no two spheres intersect. Also: pure CSS #3D shading!
Also #tinyCodingTip: sphere surface distribution with polar coordinates!
u = rand(0, 1)
v = rand(0, 1)
❌ DON'T (pole clusters)
θ = 2·π·u
φ = v·π - π/2
✅ DO
θ = 2·π·u
φ = acos(2·v - 1) - π/2
➞x,y,z
x = r·cos(φ)·sin(θ)
y = r·sin(φ)
z = r·cos(φ)·cos(θ)
In pure CSS 😼
https://cdpn.io/yLzxdjj