Skip to Content
GPGPU Programming for Games and Science
book

GPGPU Programming for Games and Science

by David H. Eberly
August 2014
Intermediate to advanced
469 pages
16h 30m
English
A K Peters/CRC Press
Content preview from GPGPU Programming for Games and Science
312 GPGPU Programming for Games and Science
}
}
else
{
if (r11 >=r22) // u1 ˆ2 l ar g es t magnitude
{
U = (( r10 + r01 )/2 , r11 + 1 , ( r12 + r21 )/2 );
}
else // u2 ˆ2 la rg es t magnitude
{
U = (( r20 + r02 )/2 , ( r21 + r12 )/2 , r22 + 1);
}
}
Normalize(U);
LISTING 6.35: Determining the largest-magnitude component of U from
the products of components.
Numerical bias is avoided by averaging the off-diagonal terms, ensuring the
results are the same for R or R
T
. It does not matter that the normalization
computes a positive entry in U corresponding to the specially computed diag-
onal entry. For a rotation by π radians, R(U)andR(U)arethesame
rotation matrix.
6.3.6.5 Axis-Angle to Quaternion
This conversion is simple. The quaternion angle is half the rotation ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Graphics Gems V (IBM Version)

Graphics Gems V (IBM Version)

Alan W. Paeth
GPU Pro 6

GPU Pro 6

Wolfgang Engel

Publisher Resources

ISBN: 9781466595354