def arcball_constrain_to_axis(point, axis):
v = numpy.array(point, dtype=numpy.float64, copy=True)<EOL>a = numpy.array(axis, dtype=numpy.float64, copy=True)<EOL>v -= a * numpy.dot(a, v)  <EOL>n = vector_norm(v)<EOL>if n > _EPS:<EOL><INDENT>if v[<NUM_LIT:2>] < <NUM_LIT:0.0>:<EOL><INDENT>numpy.negative(v, v)<EOL><DEDENT>v /= n<EOL>return v<EOL><DEDENT>if a[<NUM_LIT:2>] == <NUM_LIT:1.0>:<EOL><INDENT>return numpy.array([<NUM_LIT:1.0>, <NUM_LIT:0.0>, <NUM_LIT:0.0>])<EOL><DEDENT>return unit_vector([-a[<NUM_LIT:1>], a[<NUM_LIT:0>], <NUM_LIT:0.0>])<EOL>
Return sphere point perpendicular to axis.