211
Views
10
CrossRef citations to date
0
Altmetric
Original Articles

Building an Orthonormal Basis from a 3D Unit Vector Without Normalization

Pages 151-159 | Received 21 Jul 2011, Accepted 25 Apr 2012, Published online: 02 Aug 2012
 

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.

Acknowledgment

Thanks to an anonymous reviewer for suggesting the naïve way of finding an orthonormal basis (first function in Listing 1).

Reprints and Corporate Permissions

Please note: Selecting permissions does not provide access to the full text of the article, please see our help page How do I view content?

To request a reprint or corporate permissions for this article, please click on the relevant link below:

Academic Permissions

Please note: Selecting permissions does not provide access to the full text of the article, please see our help page How do I view content?

Obtain permissions instantly via Rightslink by clicking on the button below:

If you are unable to obtain permissions via Rightslink, please complete and submit this Permissions form. For more information, please visit our Permissions help page.