Appendix B Trigonometry(附录B 三角函数)

“Life is good for only two things, discovering mathematics and teaching mathematics.”
-Simeon Poisson

附录B部分的内容旨在作为一些简单的三角函数定理的参考,同时还包含一些更复杂的定理公式。三角函数定理是计算机图形学中特别重要的工具函数。其中一个非常实用的功能是三角函数提供了简化公式的方法,从而提高计算的速度。

B.1 Definitions(定义)


图B.1 左图中显示了三角函数 sin,cos,tan \sin,\cos,\tan的几何定义表示。右图中显示了 px=cosϕ p_x=\cos\phi和 py=sinϕ p_y=\sin\phi共同描绘出的循环周期。

如图B.1所示,其中 p=(px,py) \mathbf{p}=(p_x,p_y)是一个单位向量,即 ∥p∥=1 \|\mathbf{p}\|=1,公式B.1中定义了基本的三角函数, sin,cos,tan \sin,\cos,\tan。

Fundamental trigonometric functions(基本三角函数):sinϕ=pycosϕ=pxtanϕ=sinϕcosϕ=pypx(B.1)

\qquad \bbox[10px,border:2px solid black] { \begin{aligned} &\text{Fundamental trigonometric functions(基本三角函数):}\\[2ex] &\sin\phi =p_y\\[2ex] &\cos\phi =p_x \\[2ex] &\tan\phi =\frac{\sin\phi}{\cos\phi}=\frac{p_y}{p_x} \end{aligned} } \qquad\qquad\text{(B.1)}
如公式B.2所示, sin,cos,tan \sin,\cos,\tan函数可以扩展成MacLaurin series(麦克劳林级数)。麦克劳林级数是更通用的Taylor serices(泰勒级数)的一种特殊情况。泰勒级数是对一个任意的点进行扩展,而麦克劳林级数则是只针对 x=0 x=0的点进行扩展。

麦克劳林级数是非常有用的,因为该公式阐明了导数的一些来源(如公式B.4所示)。

MacLaurin serices(麦克劳林级数):sinϕ=ϕ−ϕ33!+ϕ55!−ϕ77!+⋯+(−1)nϕ2n+1(2n+1)!+⋯cosϕ=1−ϕ22!+ϕ44!−ϕ66!+⋯+(−1)nϕ2n(2n)!+⋯tanϕ=ϕ+ϕ33+2ϕ515+⋯+(−1)n−122n(22n−1)(2n)!B2nϕ2n−1+⋯(B.2)

\bbox[10px,border:2px solid black] { \begin{aligned} &\text{MacLaurin serices(麦克劳林级数):}\\[2ex] &\sin\phi =\phi - \frac{\phi^3}{3!} + \frac{\phi^5}{5!} - \frac{\phi^7}{7!} + \cdots + (-1)^n\frac{\phi^{2n+1}}{(2n+1)!} + \cdots \\[2ex] &\cos\phi =1 - \frac{\phi^2}{2!} + \frac{\phi^4}{4!} - \frac{\phi^6}{6!} + \cdots + (-1)^n\frac{\phi^{2n}}{(2n)!} + \cdots \\[2ex] &\tan\phi =\phi + \frac{\phi^3}{3} + \frac{2\phi^5}{15} + \cdots + (-1)^{n-1}\frac{2^{2n}(2^{2n}-1)}{(2n)!}B_{2n}\phi^{2n-1} + \cdots \end{aligned} } \qquad\qquad\text{(B.2)}
在前两个级数中 ϕ \phi 的取值范围为 −∞<ϕ<∞ -\infty,而最后一个级数中则为 −π/2<ϕ<π/2 -\pi/2,并且 Bn B_n 表示第 n n 个Bernoulli number(伯努利数)。

注:伯努利数可以使用一种递推公式生成,比如令B0=1B_0=1,对于 k>1 k>1,有 ∑k−1j=0(kj)Bj=0 \sum_{j=0}^{k-1}\binom{k}{j}B_j=0

这三个基本三角函数的反函数分别为, arcsin,arccos,arctan \arcsin,\arccos,\arctan,定义如公式B.3所示:

Inverses of trigonometric functions(基本三角函数的反函数):py=sinϕ⇔ϕ=arcsinpy,−1≤py≤1,−π2≤ϕ≤π2px=cosϕ⇔ϕ=arccospx,−1≤px≤1,0≤ϕ≤πpypx=tanϕ⇔ϕ=arctanpypx,−∞≤pypx≤∞,−π2≤ϕ≤π2(B.3)

\qquad \bbox[10px,border:2px solid black] { \begin{aligned} &\text{Inverses of trigonometric functions(基本三角函数的反函数):}\\[2ex] &p_y = \sin\phi \Leftrightarrow \phi=\arcsin p_y, \quad-1\leq p_y\leq1, \quad-\frac{\pi}{2}\leq\phi\leq\frac{\pi}{2} \\[2ex] &p_x = \cos\phi \Leftrightarrow \phi=\arccos p_x, \quad-1\leq p_x\leq1, \quad0\leq\phi\leq\pi \\[2ex] &\frac{p_y}{p_x}=\tan\phi \Leftrightarrow \phi=\arctan\frac{p_y}{p_x}, \quad-\infty\leq\frac{p_y}{p_x}\leq\infty, \quad-\frac{\pi}{2}\leq\phi\leq\frac{\pi}{2} \end{aligned} } \qquad\qquad\text{(B.3)}

基本三角函数和反函数的导数总结如下:

Trigonometric derivatives(三角函数的导数):dsinϕdϕ=cosϕdcosϕdϕ=−sinϕdtanϕdϕ=1cos2ϕ=1+tan2ϕdarcsintdt=11−t2−−−−−√darccostdt=−11−t2−−−−−√darctantdt=11+t2(B.4)

\qquad \bbox[10px,border:2px solid black] { \begin{aligned} &\text{Trigonometric derivatives(三角函数的导数):}\\[2ex] &\frac{d\sin\phi}{d\phi} =\cos\phi\\[2ex] &\frac{d\cos\phi}{d\phi} =-\sin\phi \\[2ex] &\frac{d\tan\phi}{d\phi} =\frac{1}{\cos^2\phi}=1+\tan^2\phi \\[2ex] &\frac{d\arcsin t}{dt}=\frac{1}{\sqrt{1-t^2}} \\[2ex] &\frac{d\arccos t}{dt}=-\frac{1}{\sqrt{1-t^2}} \\[2ex] &\frac{d\arctan t}{dt}=\frac{1}{1+t^2} \end{aligned} } \qquad\qquad\text{(B.4)}

B.2 Trigonometric Laws and Formulae


图B.2 直角三角形及相关的记号表示

我们首先讨论直角三角形的基本定理。使用图B.2所示的记号,可以使用以下公式描述这些定理:

Right triangle laws(直角三角形定理):sinα=accosα=bctanα=sinαcosα=ab(B.5)

\qquad \bbox[10px,border:2px solid black]{ \begin{aligned} &\text{Right triangle laws(直角三角形定理):}\\[2ex] &\sin\alpha = \frac{a}{c} \\[2ex] &\cos\alpha = \frac{b}{c} \\[2ex] &\tan\alpha = \frac{\sin\alpha}{\cos\alpha} = \frac{a}{b} \\[2ex] \end{aligned} } \qquad\qquad\text{(B.5)}

Pythagorean relation(勾股定理):c2=a2+b2(B.6)

\qquad \bbox[10px,border:2px solid black]{ \begin{aligned} &\text{Pythagorean relation(勾股定理):} &c^2=a^2+b^2 \end{aligned} } \qquad\qquad\text{(B.6)}

图B.3 任意三角形及相关的记号表示

以下的著名定理对于任意的三角形都是有效的,其中所使用的记号如图B.3所示:

Law of sines(正弦定理):Law of cosines(余弦定理):Law of tangents(正切定理):sinαa=sinβb=sinγcc2=a2+b2−2abcosγa+ba−b=tanα+β2tanα−β2(B.7)

\qquad \bbox[10px,border:2px solid black]{ \begin{aligned} \text{Law of sines(正弦定理):} &\quad\frac{\sin\alpha}{a} = \frac{\sin\beta}{b} = \frac{\sin\gamma}{c} \\[2ex] \text{Law of cosines(余弦定理):} &\quad c^2=a^2+b^2-2ab\cos\gamma \\[2ex] \text{Law of tangents(正切定理):} &\quad \frac{a+b}{a-b}=\frac{\tan\frac{\alpha+\beta}{2}}{\tan\frac{\alpha-\beta}{2}} \end{aligned} } \qquad\qquad\text{(B.7)}
此外,以下两个公式对任意的三角形也是有效的,这两个公式分别以发明者的姓名进行命名:

Newton's formula :Mollweide's formula :b+ca=cosβ−γ2sinα2b−ca=sinβ−γ2cosα2(B.8)

\qquad \bbox[10px,border:2px solid black]{ \begin{aligned} \text{Newton's formula :} &\quad\frac{b+c}{a} = \frac{\cos\frac{\beta-\gamma}{2}}{\sin\frac{\alpha}{2}} \\[2ex] \text{Mollweide's formula :} &\quad \frac{b-c}{a} = \frac{\sin\frac{\beta-\gamma}{2}}{\cos\frac{\alpha}{2}} \end{aligned} } \qquad\qquad\text{(B.8)}
把三角函数的定义(公式B.1)与勾股定理(公式B.6)相结合可以得到以下的三角恒等式:

Trigonometric identity(三角恒等式):cos2ϕ+sin2ϕ=1(B.6)

\qquad \bbox[10px,border:2px solid black]{ \begin{aligned} &\text{Trigonometric identity(三角恒等式):} &\cos^2\phi+\sin^2\phi=1 \end{aligned} } \qquad\qquad\text{(B.6)}
接下来描述三角函数的倍角公式,使用这些公式可以简化计算,并使得公式的实现更加高效。二倍角公式如下所示:

Double angle relations(二倍角公式):sin2ϕ=2sinϕcosϕ=2tanϕ1+tan2ϕcos2ϕ=cos2ϕ−sin2ϕ=1−2sin2ϕ=2cos2ϕ−1=1−tan2ϕ1+tan2ϕtan2ϕ=2tanϕ1−tan2ϕ(B.10)

\qquad \bbox[10px,border:2px solid black]{ \begin{aligned} &\text{Double angle relations(二倍角公式):}\\[2ex] &\sin2\phi = 2\sin\phi\cos\phi = \frac{2\tan\phi}{1+\tan^2\phi} \\[2ex] &\cos2\phi = \cos^2\phi-\sin^2\phi = 1-2\sin^2\phi = 2\cos^2\phi - 1 = \frac{1-\tan^2\phi}{1+\tan^2\phi} \\[2ex] &\tan2\phi = \frac{2\tan\phi}{1-\tan^2\phi} \end{aligned} } \qquad\qquad\text{(B.10)}
在些基础上做一些扩展可以得到三倍角公式,如下所示:

Multiple angle relations(多倍角公式):sin(nϕ)=2sin((n−1)ϕ)cosϕ−sin((n−2)ϕ)cos(nϕ)=2cos((n−1)ϕ)cosϕ−cos((n−2)ϕ)tan(nϕ)=tan((n−1)ϕ)+tanϕ1−tan((n−1)ϕ)tanϕ(B.11)

\qquad \bbox[10px,border:2px solid black]{ \begin{aligned} &\text{Multiple angle relations(多倍角公式):}\\[2ex] &\sin(n\phi) = 2\sin((n-1)\phi)\cos\phi - \sin((n-2)\phi) \\[2ex] &\cos(n\phi) = 2\cos((n-1)\phi)\cos\phi - \cos((n-2)\phi) \\[2ex] &\tan(n\phi) = \frac{\tan((n-1)\phi)+\tan\phi}{1-\tan((n-1)\phi)\tan\phi} \end{aligned} } \qquad\qquad\text{(B.11)}
公式B.12和B.13列出了三角函数的和差定理,称为和差恒等式。

Angle sum relations(三角和公式):sin(ϕ+ρ)=sinϕcosρ+cosϕsinρcos(ϕ+ρ)=cosϕcosρ−sinϕsinρtan(ϕ+ρ)=tanϕ+tanρ1−tanϕtanρ(B.12)

\qquad \bbox[10px,border:2px solid black]{ \begin{aligned} &\text{Angle sum relations(三角和公式):}\\[2ex] &\sin(\phi+\rho) = \sin\phi\cos\rho + \cos\phi\sin\rho \\[2ex] &\cos(\phi+\rho) = \cos\phi\cos\rho - \sin\phi\sin\rho \\[2ex] &\tan(\phi+\rho) = \frac{\tan\phi+\tan\rho}{1-\tan\phi\tan\rho} \end{aligned} } \qquad\qquad\text{(B.12)}

Angle difference relations(三角差公式):sin(ϕ−ρ)=sinϕcosρ−cosϕsinρcos(ϕ−ρ)=cosϕcosρ+sinϕsinρtan(ϕ−ρ)=tanϕ−tanρ1+tanϕtanρ(B.13)

\qquad \bbox[10px,border:2px solid black]{ \begin{aligned} &\text{Angle difference relations(三角差公式):}\\[2ex] &\sin(\phi-\rho) = \sin\phi\cos\rho - \cos\phi\sin\rho \\[2ex] &\cos(\phi-\rho) = \cos\phi\cos\rho + \sin\phi\sin\rho \\[2ex] &\tan(\phi-\rho) = \frac{\tan\phi-\tan\rho}{1+\tan\phi\tan\rho} \end{aligned} } \qquad\qquad\text{(B.13)}
接下来是积化和差公式:

Product relations(积化和差公式):sinϕsinρ=12(cos(ϕ−ρ)−cos(ϕ+ρ))cosϕcosρ=12(cos(ϕ−ρ)+cos(ϕ+ρ))sinϕcosρ=12(sin(ϕ−ρ)+sin(ϕ+ρ))(B.14)

\qquad \bbox[10px,border:2px solid black]{ \begin{aligned} &\text{Product relations(积化和差公式):}\\[2ex] &\sin\phi\sin\rho = \frac{1}{2}(\cos(\phi-\rho)-\cos(\phi+\rho)) \\[2ex] &\cos\phi\cos\rho = \frac{1}{2}(\cos(\phi-\rho)+\cos(\phi+\rho)) \\[2ex] &\sin\phi\cos\rho = \frac{1}{2}(\sin(\phi-\rho)+\sin(\phi+\rho)) \end{aligned} } \qquad\qquad\text{(B.14)}
公式B.15和B.16分别为和差化积公式和半角公式。

Function sums and differences(和差化积公式):sinϕ+sinρ=2sinϕ+ρ2cosϕ−ρ2cosϕ+cosρ=2cosϕ+ρ2cosϕ−ρ2tanϕ+tanρ=sin(ϕ+ρ)cosϕcosρsinϕ−sinρ=2cosϕ+ρ2sinϕ−ρ2cosϕ−cosρ=−2sinϕ+ρ2sinϕ−ρ2tanϕ−tanρ=sin(ϕ−ρ)cosϕcosρ(B.15)

\qquad \bbox[10px,border:2px solid black]{ \begin{aligned} &\text{Function sums and differences(和差化积公式):}\\[2ex] &\sin\phi+\sin\rho = 2\sin\frac{\phi+\rho}{2}\cos\frac{\phi-\rho}{2} \\[2ex] &\cos\phi+\cos\rho = 2\cos\frac{\phi+\rho}{2}\cos\frac{\phi-\rho}{2} \\[2ex] &\tan\phi+\tan\rho = \frac{\sin(\phi+\rho)}{\cos\phi\cos\rho} \\[2ex] &\sin\phi-\sin\rho = 2\cos\frac{\phi+\rho}{2}\sin\frac{\phi-\rho}{2} \\[2ex] &\cos\phi-\cos\rho = -2\sin\frac{\phi+\rho}{2}\sin\frac{\phi-\rho}{2} \\[2ex] &\tan\phi-\tan\rho = \frac{\sin(\phi-\rho)}{\cos\phi\cos\rho} \end{aligned} } \qquad\qquad\text{(B.15)}

Half-angle relations(半角公式):sinϕ2=±1−cosϕ2−−−−−−−−√cosϕ2=±1+cosϕ2−−−−−−−−√tanϕ2=±1−cosϕ1+cosϕ−−−−−−−−√=1−cosϕsinϕ=sinϕ1+cosϕ(B.15)

\qquad \bbox[10px,border:2px solid black]{ \begin{aligned} &\text{Half-angle relations(半角公式):}\\[2ex] &\sin\frac{\phi}{2} = \pm\sqrt{\frac{1-\cos\phi}{2}} \\[2ex] &\cos\frac{\phi}{2} = \pm\sqrt{\frac{1+\cos\phi}{2}} \\[2ex] &\tan\frac{\phi}{2} = \pm\sqrt{\frac{1-\cos\phi}{1+\cos\phi}}=\frac{1-\cos\phi}{\sin\phi}=\frac{\sin\phi}{1+\cos\phi} \end{aligned} } \qquad\qquad\text{(B.15)}

Further Reading and Resources

Graphics Gems一书中的第一章提供了计算机图形学中其他的非常实用的几何定理。在CRC Standard Mathematical Tables and Formulas第31版中包含了该附录中的所有定理公式,以及更多附录中没有提到的部分。

Real-Time Rendering-附录B 三角函数相关推荐

  1. Real-Time Rendering 4th 译文《一》

    * 继承遗志,砥砺前行. Real-Time Rendering 4th 译文 ** 章节1 介绍 实时渲染技术是关注于如何在电脑上极为快速地生成图像.它是与计算机图形最相关的领域.一张图像出现在屏幕 ...

  2. Real-time Rendering (3rd edition)学习笔记第4章

    目录 第4章 变换(Transforms) 4.1 基本变换(Basic Transforms) 4.1.1 平移(Translation) 4.1.2 旋转(Rotation) 4.1.3 缩放(S ...

  3. 【《Real-Time Rendering 3rd》提炼总结】完结篇:系列合集电子书PDF下载实时渲染知识网络图谱新系列预告

    本文由@浅墨_毛星云 出品,首发于知乎专栏,转载请注明出处.   文章链接: https://zhuanlan.zhihu.com/p/34207965 按照专栏之前的计划,[<Real-Tim ...

  4. Physically Based Rendering——史上最容易理解的BRDF中D函数NDF的中文资料

    粗糙度决定了D函数的分布,一般粗糙度是D函数的方差 本文假定读者已经对PBR即Physcially Based Rendering 基于物理的渲染有了初步的了解,对于PBR的入门有很多文章都介绍的不错 ...

  5. Linux-2.6驱动开发 附录一 设备名称

    附录一 设备名称 Major Minor Name 0 Unnamed devices (e.g. non-device mounts) 0 = reserved as null device num ...

  6. IMAGE-GUIDED NEURAL OBJECT RENDERING

    IMAGE-GUIDED NEURAL OBJECT RENDERING 摘要 我们提出了一种学习的图像引导绘制技术,它结合了基于图像的绘制和基于GAN的图像合成的优点.我们的方法的目标是为虚拟和增强 ...

  7. PIRenderer: Controllable Portrait Image Generation via Semantic Neural Rendering (译文)

    PIRenderer: Controllable Portrait Image Generation via Semantic Neural Rendering 链接 视频: https://www. ...

  8. Real-Time Rendering 笔记

    里面有些公式和矩阵无法在电脑上书写, 故用纸笔记录了一些笔记, 比如公式的推算, 注意要点等. 由于电子书是黑白图, 不好理解, 所以弄了彩色配图上来 Chapter 1 Introduction 1 ...

  9. Real-time rendering笔记

    Chapter 1 Introduction 1. 实时渲染---图像在计算机上快速的显示 2. 15fps --- 实时渲染的基本fps. 72fps以及更大的fps观察者无法发现其中的差别 60f ...

最新文章

  1. Oracle中INSTR和SUBSTR的用法
  2. 谁动了我的主机? 之活用History命令|Linux安全运维
  3. 0基础入门,如何快速上手Python?
  4. Winform中实现点击按钮弹窗输入密码验证通过后执行相应逻辑
  5. 用姓名字段统计人数_2019年度全国各地姓名报告分析汇总(全国、深圳、佛山、杭州)...
  6. python学习笔记之——range()函数
  7. (转载)HTTP与RPC的区别
  8. 可隐藏选项卡html,隐藏HTML中选定选项卡的底部边框
  9. Google Chrome 扩展程序开发
  10. Postman使用入门
  11. java消息推送怎么实现_PHP实现的消息实时推送功能
  12. ofo 辟谣“月盈利百万”;苹果回应向腾讯传输数据;Python 3.8.0 发布 | 极客头条...
  13. LINUX下解决netstat查看TIME_WAIT状态过多问题
  14. java httpclient 下载文件_httpclient 上传文件、下载文件
  15. 电力电子技术笔记(3)——晶闸管
  16. matlab 固态 机械_固态硬盘无法识别或数据删除还能恢复数据吗?
  17. C语言 55555图形 找车牌问题
  18. 不能随便给他人登录微信小程序
  19. (泰勒展开式/欧拉公式)证明:e^x推导及e^(iπ) = -1展开过程
  20. Adobe read X安装过程中出现无法将数值DisableExceptionChainValidation写入键

热门文章

  1. 软件开发实训(720实训)——3细述QQ与TIM的不同之处
  2. 富士康工业互联网公司真的是做工业互联网的,怎么说你们咋都不相信呢
  3. 如何开发一个简单的智能对话查询工具
  4. 早期星际十大人物(学生时代,星际时代)
  5. 双色球彩票java版
  6. 拼多多创始人黄峥:我的创业人生与人生理解
  7. H5微信内置浏览器携带参数跳转APP和监听是否安装APP(wx-open-launch-app)
  8. 多项式插值之Lagrange、PCHIP与Spline以及BD-Rate和BD-PSNR的计算
  9. 知识图谱和专家系统、知识工程、数据库等概念的比较
  10. 一步步学习微软InfoPath2010和SP2010--第五章节--添加逻辑和规则到表单(6)--使用规则创建多视图样式向导表单