Elektrine lite

← Feed

@unnick@booping.synth.download

Post #4080712

2026-07-23 23:19 UTC

hey do any of you know how to do weighted interpolation between 3 points on the surface of a sphere, in a way thats symmetric, produces uniform density of results (i.e. for any subset of the input, the ratio between the area of the input and the output is constant), and optionally reduces to usual 2 point slerp when one of the weights is 0? are the last 2 conditions even compatible? even doing this for the special case of interpolating between (1,0,0), (0,1,0), (0,0,1) is hard

Replies (3)

  • @matt_zucker@mastodon.social 2026-07-24 13:13

    @unnick@booping.synth.download here are two things you could try: 1) spherical area coordinates are one way of generalizing barycentric coordinates to the sphere, check out https://brsr.github.io/2023/11/04/spherical-areal.html 2) you could fit a homogeneous polynomial of the form c200*x^2 + c020*y^2 + c002*x^2 + c110*x*y + c101*x*z + c011*y*z and sample it. this framework is described in Alfeld et al. 1996 "Bernstein-Bézier polynomials on spheres and sphere-like surfaces." https://www.researchgate.net/profile/Mike-Neamtu/publication/2509001_Bernstein-B'ezier_Polynomials_on_Spheres_and_Sphere-Like_Surfaces/links/540daaef0cf2d8daaacc78c4/Bernstein-Bezier-Polynomials-on-Spheres-and-Sphere-Like-Surfaces.pdf I have played with both approaches and...

    Open ##4080721

  • @TomF@mastodon.gamedev.place 2026-07-24 06:21

    @unnick@booping.synth.download I would find the weighted average vector, normalize, then project the original three onto the plane with that normal. Then do barycentric interpolation from there. I think it satisfies all your conditions? It's not true slerp in the 2-case, but true slerp is overrated. http://number-none.com/product/Understanding%20Slerp,%20Then%20Not%20Using%20It/

    Open ##4080726

  • @ianh@mastodon.social 2026-07-24 00:08

    @unnick@booping.synth.download i think the last two conditions are similar to asking for a map projection that's both area and distance preserving?

    Open ##4080728