延伸阅读(Further Reading

DeRose、Goldman 及其合作者提出了一种优雅的“无坐标(coordinate-free)”方法来描述图形的向量几何,其中位置和方向恰好用特定坐标系的 \( (x,y,z) \) 坐标表示的事实被淡化,而点和向量本身记录了它们所表达的坐标系(Goldman 1985DeRose 1989Mann 等,1997)。这使得软件层能够确保常见错误,例如在一个坐标系中将向量与另一个坐标系中的点相加,可以通过先将它们转换为一个公共坐标系来透明地处理。Geisler 等(2020)描述了一种相关的方法,他们使用编程语言的类型系统对坐标系进行了编码。我们在 pbrt 中没有遵循这两种方法,尽管它们背后的原则在处理计算机图形中的坐标系时非常值得理解和牢记。

施耐德和埃伯利的 《计算机图形学的几何工具》(Geometric Tools for Computer Graphics) 受到无坐标方法的影响,涵盖了本章主题的更深层次内容(施耐德和埃伯利 2003)。该书还包含了许多用于图形的有用几何算法。罗杰斯和亚当斯的 《计算机图形学的数学元素》(Mathematical Elements for Computer Graphics)1990)是本章主题的经典且更传统的介绍。需要注意的是,他们的书使用行向量表示点和向量,这意味着在他们的框架中,我们的矩阵会被转置,并且他们通过矩阵乘以点和向量来进行变换 \( (\text{p}\mathbf{M}) \),而不是像我们那样将矩阵乘以点 \( \mathbf{M}\text{p} \)。齐次坐标在本章中仅被简要提及,尽管它们是投影几何的基础,许多优雅算法的基础。斯托尔菲的书是该主题的优秀介绍(斯托尔菲 1991)。

关于线性代数和向量几何,有许多优秀的书籍。我们发现 Lang(1986)和 Buck(1978)在这些主题上是很好的参考。另请参阅 Akenine-Möller 等人的 《实时渲染》(Real-Time Rendering) 一书(2018),该书为线性代数提供了扎实的图形基础介绍。Ström 等人撰写了一本优秀的在线线性代数书籍,immersivemath.com,书中包含互动图形,展示了关键概念(2020)。

Donnay 的书(1945)对球面三角学进行了简明而全面的介绍。方程(3.6)中三角形的立体角表达式源于 Van Oosterom 和 Strackee(1983)。

一种设计向量数学库的替代方法是由 Guennebaud、Jacob 等人(2010)提出的广泛使用的 eigen 系统。除了支持 CPU SIMD 向量指令集外,它还广泛使用 表达式模板(expression templates),这是一种 C++编程技术,使得在编译时简化和优化向量及矩阵表达式的评估成为可能。

法向量变换的细微之处在图形学界首次被广泛理解,源于 Wallis(1990)和 Turkowski(1990b)的文章。

Cigolle 等人(2014)比较了多种紧凑编码单位向量的方法。 OctahedralVector 中实现的方法源于 Meyer 等人(2010),他们还表明,如果使用 52 位进行这种表示,精度等同于归一化的 Vector3f。 (我们的实现还包括 Cigolle 等人(2014)建议的改进。)它所基于的八面体编码是由 Praun 和 Hoppe(2003)提出的。

3.8.3 节中的等面积球面映射算法源于 Clarberg(2008);我们对映射函数的实现来自于该论文附带的高性能 CPU SIMD 实现。其基于的正方形到半球的映射是由 Shirley 和 Chiu(1997)开发的。

CoordinateSystem() 中使用的算法基于 Frisvad(2012)首次提出的方法。我们在实现中使用的提高数值精度的重构是由 Duff 等人(2017)和 Max(2017)同时提出的。在 RotateFromTo() 中实现的算法是由 Möller 和 Hughes(1999)引入的,Hughes(2021)对反射向量的计算进行了调整。

本章定义的数值稳健的 AngleBetween() 函数源于 Hatch(2003)。

Barequet 和 Elber(2005)提出了一种计算多个方向向量的 紧凑边界圆锥(tight bounding cone) 的算法。

参考文献(References)

  • Akenine-Möller, T., E. Haines, N. Hoffman, A. Peesce, M. Iwanicki, and S. Hillaire. 2018. Real-Time Rendering (4th ed.). Boca Raton, FL: CRC Press.
  • Arvo, J. 1990. Transforming axis-aligned bounding boxes. In A. S. Glassner (ed.), Graphics Gems I, 548–50. San Diego: Academic Press.
  • Barequet, G., and G. Elber. 2005. Optimal bounding cones of vectors in three dimensions. Information Processing Letters 93 (2), 83–89.
  • Buck, R. C. 1978. Advanced Calculus. New York: McGraw-Hill.
  • Cigolle, Z. H., S. Donow, D. Evangelakos, M. Mara, M. McGuire, and Q. Meyer. 2014. Survey of efficient representations for independent unit vectors. Journal of Computer Graphics Techniques (JCGT) 3 (2), 1–30.
  • Clarberg, P. 2008. Fast equal-area mapping of the (hemi)sphere using SIMD. Journal of Graphics Tools 13 (3), 53–68.
  • DeRose, T. D. 1989. A Coordinate-Free Approach to Geometric Programming. Math for SIGGRAPH, SIGGRAPH Course Notes #23. Also available as Technical Report No. 89-09-16, Department of Computer Science and Engineering, University of Washington, Seattle.
  • Donnay, J. D. H. 1945. Spherical Trigonometry after the Cesàro Method. New York, NY: Interscience Publishers.
  • Duff, T., J. Burgess, P. Christensen, C. Hery, A. Kensler, M. Liani, and R. Villemin. 2017. Building an orthonormal basis, revisited. Journal of Computer Graphics Techniques (JCGT) 6 (1), 1–8.
  • Frisvad, J. R. 2012. Building an orthonormal basis from a 3d unit vector without normalization. Journal of Graphics Tools 16 (3), 151–159.
  • Geisler, D., I. Yoon, A. Kabra, H. He, Y. Sanders, and A. Sampson. 2020. Geometry types for graphics programming. Proceedings of the ACM on Programming Languages (OOPSLA 2020) 4, 173:1–25.
  • Goldman, R. 1985. Illicit expressions in vector algebra. ACM Transactions on Graphics 4 (3), 223–43.
  • Guennebaud, G., B. Jacob, and others. 2010. Eigen v3. http://eigen.tuxfamily.org.
  • Hatch, D. 2003. The right way to calculate stuff. http://www.plunk.org/ hatch/rightway.html.
  • Hughes, J. F. 2021. Personal communication.
  • Lang, S. 1986. An Introduction to Linear Algebra. New York: Springer-Verlag.
  • Möller, T., and J. Hughes. 1999. Efficiently building a matrix to rotate one vector to another. Journal of Graphics Tools 4 (4), 1–4.
  • Mann, S., N. Litke, and T. DeRose. 1997. A coordinate free geometry ADT. Research Report CS-97-15, Computer Science Department, University of Waterloo.
  • Max, N. 2017. Improved accuracy when building an orthonormal basis. Journal of Computer Graphics Techniques (JCGT) 6 (1), 9–16.
  • Meyer, Q., J. Süssmuth, G. Sussner, M. Stamminger, and G. Greiner. 2010. On floating-point normal vectors. Proceedings of the 21st Eurographics Conference on Rendering, 1405–9.
  • Praun, E., and Hoppe, H. 2003. Spherical parameterization and remeshing. ACM Transactions on Graphics (Proceedings of SIGGRAPH 2003) 22 (3), 340–49.
  • Rogers, D. F., and J. A. Adams. 1990. Mathematical Elements for Computer Graphics. New York: McGraw-Hill.
  • Schneider, P. J., and D. H. Eberly. 2003. Geometric Tools for Computer Graphics. San Francisco: Morgan Kaufmann.
  • Shirley, P., and K. Chiu. 1997. A low distortion map between disk and square. Journal of Graphics Tools 2 (3), 45–52.
  • Stolfi, J. 1991. Oriented Projective Geometry. San Diego: Academic Press.
  • Ström, J., K. Åström, and T. Akenine-Möller. 2020. Immersive linear algebra. immersivemath.com.
  • Turkowski, K. 1990b. Properties of surface-normal transformations. In A. S. Glassner (ed.), Graphics Gems I, 539–47. San Diego: Academic Press.
  • Van Oosterom, A., and J. Strackee. 1983. The solid angle of a plane triangle. IEEE Transactions on Biomedical Engineering BME-30 (2), 125–26.
  • Wallis, B. 1990. Forms, vectors, and transforms. In A. S. Glassner (ed.), Graphics Gems I, 533–38. San Diego: Academic Press.