I'm using a 3D rendering tool which requires objects to define their orientation as a quaternion.
I have a graphical object (imagine an airplane) which has a default orientation (ie no rotation applied to it) such that it is pointing along the +ve y axis. Tail is at 0,0,0, nose is at (0, 10, 0)
Users specify their desired orientation by defining 2 points in 3D space, ie P1 and P2.
I need to figure out what quaternion value to apply to my graphical object, such that the one end (tail) of it will be P1, and the nose tip will be at P2.
How do I calculate this quaternion given P1(x,y,z) and P2(x,y,z) ?