Difference between revisions of "Float quaternion Transform"

From OpenLuna
Jump to: navigation, search
(New page: qtransr(float *q,float *r, float *qrq) /* transform (rotate) a vector */ /* represented by quotonian (0,vx,vy,vz) */ - by a qutonian q rnew = q*rold*qconj: /* this r...)
 

Latest revision as of 15:58, 29 April 2009

qtransr(float *q,float *r, float *qrq)
/* transform (rotate) a vector            */
/*  represented by quotonian (0,vx,vy,vz) */
/*  by a qutonian q  rnew = q*rold*qconj  */
/* this routine uses subcall, might be    */
/* faster by individual eqns              */
/* ges 042709                             */
{
 float qr[4],qc[4];
 qconj(q,qc);
 qdotq(q,r,qr);     /* qr = q dot r */
 qdotq(qr,qc,qrq);  /* qrq= (q dot r) dot qconj */
} /* end qtransr */
Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox