球坐标与直角坐标的转换 |
您所在的位置:网站首页 › 球坐标系怎么表示 › 球坐标与直角坐标的转换 |
(建议阅读原文) 预备知识 球坐标系的定义, 四象限 Arctan 函数 根据球坐标的定义,可得两种坐标之间的变换关系 \begin{align}&\begin{cases} x = r\sin \theta \cos \phi \\ y = r\sin \theta \sin \phi \\ z = r\cos \theta \end{cases}&(1)\\\end{align} \begin{align}&\left\{\begin{aligned} r &= \sqrt {x^2 + y^2 + z^2} \\ \theta &= \arccos \frac{z}{\sqrt{x^2 + y^2 + z^2} }\\ \phi &= \operatorname{Arctan} (y, x) \end{aligned}\right.&(2)\\\end{align} 其中 \operatorname{Arctan} 函数的定义见式 1 . 以及两组基底之间的变换关系 \begin{align}&\begin{cases} \hat{\boldsymbol{\mathbf{r}}} = \sin\theta\cos\phi\, \hat{\boldsymbol{\mathbf{x}}} + \sin\theta\sin\phi\, \hat{\boldsymbol{\mathbf{y}}} + \cos\theta\, \hat{\boldsymbol{\mathbf{z}}} \\ \hat{\boldsymbol{\mathbf{\theta}}} = \cos\theta\cos\phi\, \hat{\boldsymbol{\mathbf{x}}} + \cos\theta\sin\phi\, \hat{\boldsymbol{\mathbf{y}}} - \sin\theta\, \hat{\boldsymbol{\mathbf{z}}} \\ \hat{\boldsymbol{\mathbf{\phi}}} = - \sin\phi\, \hat{\boldsymbol{\mathbf{x}}} + \cos\phi\, \hat{\boldsymbol{\mathbf{y}}} \end{cases}&(3)\\\end{align} \begin{align}&\begin{cases} \hat{\boldsymbol{\mathbf{x}}} = \sin \theta \cos \phi \, \hat{\boldsymbol{\mathbf{r}}} + \cos \theta \cos \phi \, \hat{\boldsymbol{\mathbf{\theta}}} - \sin \phi \, \hat{\boldsymbol{\mathbf{\phi}}} \\ \hat{\boldsymbol{\mathbf{y}}} = \sin \theta \sin \phi \, \hat{\boldsymbol{\mathbf{r}}} + \cos \theta \sin \phi \, \hat{\boldsymbol{\mathbf{\theta}}} + \cos \phi \, \hat{\boldsymbol{\mathbf{\phi}}} \\ \hat{\boldsymbol{\mathbf{z}}} = \cos \theta \, \hat{\boldsymbol{\mathbf{r}}} - \sin \theta \, \hat{\boldsymbol{\mathbf{\theta}}} \end{cases}&(4)\\\end{align} 推导 把空间中一点 P 的位矢 r \, \hat{\boldsymbol{\mathbf{r}}} 分解为垂直于 xy 平面的分量 z = r\cos \theta 和 xy 平面的分量 r\sin \theta. 后者又可以进而分解成 x 分量 和 y 分量 x = r\sin \theta \cos \phi, y = r\sin \theta \sin \phi, 这就得到了式 1 . 在直角坐标系中, 有 r = \sqrt {x^2 + y^2 + z^2}, 代入式 1 中的三条关系,就可以很容易解出式 2 中的三条关系. 现在推导变换关系(式 3 ).由于 \hat{\boldsymbol{\mathbf{r}}} , \hat{\boldsymbol{\mathbf{\theta}}} , \hat{\boldsymbol{\mathbf{\phi}}} 都是关于 (r, \theta, \phi) 的函数,所以在考察一点 (r, \theta, \phi) 时, \hat{\boldsymbol{\mathbf{r}}} 的球坐标是 (1, \theta, \phi), 根据式 1 变换到直角坐标为 \begin{align}&(\sin \theta \cos \phi,\,\sin \theta \sin \phi,\,\cos \theta)&(5)\\\end{align} 写成矢量的形式,就是 \begin{align}&\hat{\boldsymbol{\mathbf{r}}} = \sin \theta \cos \phi \, \hat{\boldsymbol{\mathbf{x}}} + \sin \theta \sin \phi \, \hat{\boldsymbol{\mathbf{y}}} + \cos \theta \, \hat{\boldsymbol{\mathbf{z}}}&(6)\\\end{align} 至于式 3 的第二条式子,在同一个球坐标 (r,\theta ,\phi) 处, \hat{\boldsymbol{\mathbf{\theta}}} 的球坐标为 (1, \theta + \pi /2, \phi), 根据式 1 变换到直角坐标再化简就得到直角坐标和对应的矢量形式为 \begin{align}&(\cos \theta \cos \phi ,\,\cos \theta \sin \phi , \,- \sin \theta)&(7)\\\end{align} \begin{align}&\hat{\boldsymbol{\mathbf{\theta}}} = \cos \theta \cos \phi \, \hat{\boldsymbol{\mathbf{x}}} + \cos \theta \sin \phi \, \hat{\boldsymbol{\mathbf{y}}} - \sin \theta \, \hat{\boldsymbol{\mathbf{z}}}&(8)\\\end{align} 同理,在同一点 (r, \theta, \phi) 处, \hat{\boldsymbol{\mathbf{\phi}}} 的球坐标为 (1, \pi /2, \phi + \pi /2), 得到第三条式子. 下面推导变换式 4 . 由于已经知道了变换式 3 , 且直角坐标系和球坐标系中的基底都是单位正交基,所以直接把变换式 3 中的系数写成 3 \times 3 的矩阵形式,再转置 即可得到变换式 4 中的系数矩阵.
|
今日新闻 |
推荐新闻 |
CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3 |