WRT: https://twitter.com/marc_b_reynolds/status/765092187960971264
uses stuff from: http://marc-b-reynolds.github.io/quaternions/2016/05/30/QuatHDAngleCayley.html
Given two 2D point sets of 'n' elements both on unit disc, taking a point from each: p0=(x0,y0) and p1=(x1,y1)
map to point 'S' on 3-sphere (4D unit sphere):
- m = sqrt((1-dot(p0,p0))/dot(p1,p1))
- S = (x0,y0,m x1,m y1) or alternately S = (m x1,m y1,x0,y0)
- rename result to (x,y,z,w)
transform to half-sphere (final component positive, quaternion half-angle..aka sqrt):
- s = 1/sqrt(2+2w)
- H = s(x,y,z,1+w)
- rename result to (x,y,z,w)
conformally map the half-sphere to 3D unit ball (quaternion Cayley transform):
- P = (x,y,z)/(1+w)
Initially thought (without really thinking about the math) that the 2 intial sets on the disc couldn't intersect, but that's wrong. The correct prop for non-intersection paths needs chosen form of S and doing some proper thinking.