最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

python - SciPy minimise to find inverse function? - Stack Overflow

programmeradmin4浏览0评论

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  # 
发布评论

评论列表(0)

  1. 暂无评论