I want to make a connection between the points at the surface of two separate spheres, with the condition that it cannot go through neither of the two spheres. (this connection is simply a line, it could be considered as a vector "starting and ending" at those two points).
For this, I have two spheres with their respective local coordinate systems (k
being a surface normal to that sphere, and i
and j
perpendicular vectors to it) an axis and center points in a global coordinate system, from which I have calculated the connection points in the global coordinate system (let's call said connection points p1
and p2
)
While getting said points and the vector between them was trivial, I am not sure how to check whether the resulting vector collides with any of those spheres.
I know that I should form and use a change of basis matrix, but I don't know how to exactly apply it for this.
Any help is appreciated.