vec im(const quat & q)
Pull out the imaginary part of q, and put it into v.
v =im(q);
quat vr2q(const vec & v, const double & r)
Put v into im(q), and put r into q.r .
q =vr2q(v,r);
quat vt2q(const vec & u, const double & phi)
The rotation quaternion, which axis direction is v and angular is theta.
q =vt2q(u,phi);