Event JSON
{
"id": "4a8cf7dd6bc69954e6562328367520ce53bf9a8bde292c6f053c0e20ad6ae36b",
"pubkey": "708789c2b324d71ee51c3818622526e1eda1f6ebd9a9ffeba1f09554be3a2562",
"created_at": 1689845837,
"kind": 1,
"tags": [
[
"e",
"1750bb49de82d1055178b1a71634c6c4bc0d7470b123683af69242d327cf10c3",
"wss://relay.mostr.pub",
"reply"
],
[
"t",
"tinyCodingTip"
],
[
"t",
"css"
],
[
"t",
"codepen"
],
[
"t",
"3d"
],
[
"t",
"maths"
],
[
"t",
"geometry"
],
[
"t",
"mathematics"
],
[
"t",
"coding"
],
[
"t",
"frontend"
],
[
"t",
"webdev"
],
[
"t",
"webdevelopment"
],
[
"t",
"distribution"
],
[
"mostr",
"https://mastodon.social/users/anatudor/statuses/110745736820689528"
]
],
"content": "Also #tinyCodingTip: random uniform sphere surface distribution with polar coordinates!\n\nu = rand(0, 1)\nv = rand(0, 1)\n\n❌ DON'T (pole clusters)\nθ = 2·π·u\nφ = v·π - π/2\n\n✅ DO\nθ = 2·π·u\nφ = acos(2·v - 1) - π/2\n\n➞x,y,z\nx = r·cos(φ)·sin(θ)\ny = r·sin(φ)\nz = r·cos(φ)·cos(θ)\n\nPure CSS illustration of concept 😼 \nhttps://codepen.io/thebabydino/pen/yLzxdjj\n\n#CSS #CodePen #3D #maths #geometry #mathematics #coding #frontend #webDev #webDevelopment #distribution\n\nhttps://files.mastodon.social/media_attachments/files/110/745/717/864/864/912/original/66cf4236d828c11f.png\n\nhttps://files.mastodon.social/media_attachments/files/110/745/718/480/630/296/original/b88a3ac005a7fb73.png",
"sig": "67d7a6b8867ebb70e1aaad0cb99a392be36ebd00ae2ce8c98eaad8607e66b1de6a3d6e3c3874ea5ee5cbf171cbd854cbad20bdd05f0c1edb6c9767cdb5c631cd"
}