I have a (non-invertible) function ak([u,v,w])
This takes a point on the surface of the unit octahedron (p: such that |u|+|v|+|w| = 1) and returns a point on the surface of the unit sphere. The function isn't perfect but the intention is to keep the distance between points authalic.
I was thinking of using SciPy minimize to provide a numerical inverse, but I cannot wrap my head around it.
input: spherical pt [x,y,z],
output octahedral pts [u,v,w] such that ak([u,v,w])=[x,y,z]
My function ak() is defined like this:
def ak(p):
# Convert point on octahedron onto the sphere.
# Credit to Anders Kaseorg: /
# input: oct_pt is a Euclidean point on the surface of a unit octagon.
# output: UVW on a unit sphere.
a = 3.227806237143884260376580641604959964752197265625 #