## Abstract

I present two tools that save the computation of a dot product and a reciprocal square root in operations that are used frequently in the core of many

rendering programs. The first tool is a formula for rotating a direction sampled around the z -axis to a direction sampled around an arbitrary unit vector. This is useful in Monte Carlo rendering techniques, such as path tracing, where directions are usually sampled in spherical coordinates and then transformed to a Cartesian unit vector in a local coordinate system where the zenith direction is the z -axis. The second tool is a more general result extracted from the first formula, namely a faster way of building an orthonormal basis from a 3D unit vector. These tools require fewer arithmetic operations than other methods I am aware of, and a performance test of the more general tool confirms that it is faster.

rendering programs. The first tool is a formula for rotating a direction sampled around the z -axis to a direction sampled around an arbitrary unit vector. This is useful in Monte Carlo rendering techniques, such as path tracing, where directions are usually sampled in spherical coordinates and then transformed to a Cartesian unit vector in a local coordinate system where the zenith direction is the z -axis. The second tool is a more general result extracted from the first formula, namely a faster way of building an orthonormal basis from a 3D unit vector. These tools require fewer arithmetic operations than other methods I am aware of, and a performance test of the more general tool confirms that it is faster.

Original language | English |
---|---|

Journal | Journal of Graphics Tools |

Volume | 16 |

Issue number | 3 |

Pages (from-to) | 151–159 |

ISSN | 1086-7651 |

DOIs | |

Publication status | Published - 2012 |