The answer to Daniel Fisher's comment is correct. It turns out that there are endless ways to build such a quaternion. The problem comes down to a linear system with three equations and four variables. It is limited (if we assume that we discard the [w] part of the result).
Perhaps I can clarify Fisherβs answer.
When you treat two vectors as quaternions and multiply them, you get their cross-product in the [x, y, z] part, and you get your negative point product in the [w] part:
| 0| | 0| |-ax*bx-ay*by-az*bz| a*b=|ax|*|bx|=| ay*bz-az*by | |ay| |by| | az*bx-ax*bz | |az| |bz| | ax*by-ay*bx |
When you leave-multiply the full quaternion with the vector, you get the same thing, but the [w] part scales the vector and adds it back to the cross-product:
|qw| | 0| |-qx*bx-qy*by-qz*bz| q*b=|qx|*|bx|=| qy*bz-qz*by+qw*bx| |qy| |by| | qz*bx-qx*bz+qw*by| |qz| |bz| | qx*by-qy*bx+qw*bz|
Recall that
axb = |a||b|sin(Ξ)n
where n is the unit vector orthogonal to a and b . AND
a . b = |a||b|cos(Ξ)
The quaternion conjugate of a vector is simply its negation.
So, if we look at the Fisher equation:
a = q*b = |b|^{-2} * a * b' * b
We can see that
a*b' = | -dotP(a,-b)| |crossP(a,-b)|
So,
a*b'*b = | -dotP(crossP(a,-b),b) | | crossP(crossP(a,-b),b) - dotP(a,-b)b |
The upper part ([w]) of this quaternion must be zero, since it is a point product between two orthogonal vectors. The lower part is a scaled version of a : nested cross-products create a vector that is orthogonal to both b and n and is the length |a|*|b|*|b| . Part of the point product adds to the projection of a on b (scaled by the square of length b ). This brings him closer to a . As soon as we divide the length of the square b , all that remains is a .
Now the question of whether this is really useful is different. It is not very useful to find a , since you need to start it. Also, the chances are good that q*c not going to do what you hope, but you must tell us what it is.