Quote:Original post by SimmerD
I am going to try this later on today, because I think it's doable, and not that hard due to symmetry. If my method works, it will undoubtedly reduce to the same math in the paper that Christer referred to.
So, you have two arbitrarily oriented ellipsoids A and B, with radii A.xyz and B.xyz, and you want to find their contact point & normal.
You want to put B in a space such that A becomes a unit sphere. If B and A are axis aligned, this is easily done by :
B.x /= A.x; B.y /= A.y; B.z /= A.z, and similarly for the center of B.
If A and B are not axis aligned, then you can't represent the ellipse's radius by 3 scalars, but by 3 vectors.
If you rotate these vectors into A's axis aligned space, then scale down the resulting vectors by A.xyz, rotate the ellipsoid center into A's space and scale down, you will now have arbitrary ellipsoid B vs unit sphere A.
[...]
I didn't go through your complete method to check wether that would be easily solvable but B base is not going to stay orthogonal if B is not axis aligned. So the sphere would need to be skewed to account for that... I guess...