given 2 points "a" and "b" in 3D space
b= center of a sphere always radius 1
I want to find vector direction "d"
The "d"s of the answer form a cone around a part of the sphere, i just need one "d"
If c is the intersection point, you know that distance(b,c) =1, the angle between vector(b,c) and vector(a,c) is 90, and the distance(a,c) is known, so you can apply the pythagorean theorem.
distance(a,b)^2 = distance(b,c) ^2 + distance(c,a)
You can easyly get the distance(a,c)
Then it seems to be a Circle-circle intersection problem (Circle 1: center in a, radius is distance a,c and Circle 2: center is b distance 1)