def arcball_map_to_sphere(point, center, radius):
v0 = (point[<NUM_LIT:0>] - center[<NUM_LIT:0>]) / radius<EOL>v1 = (center[<NUM_LIT:1>] - point[<NUM_LIT:1>]) / radius<EOL>n = v0*v0 + v1*v1<EOL>if n > <NUM_LIT:1.0>:<EOL><INDENT>n = math.sqrt(n)<EOL>return numpy.array([v0/n, v1/n, <NUM_LIT:0.0>])<EOL><DEDENT>else:<EOL><INDENT>return numpy.array([v0, v1, math.sqrt(<NUM_LIT:1.0> - n)])<EOL><DEDENT>
Return unit sphere coordinates from window coordinates.