电磁场与电磁波-1-坐标系单位矢量的变换
坐标系单位矢量的变换
柱坐标系—直角坐标系
两坐标系具有共同的 z z z变量
- 下面写出其坐标表示 ( ρ , φ , z ) → ( x , y , z ) (\rho,\varphi,z) \to (x,y,z) (ρ,φ,z)→(x,y,z)
- 以俯视图表达矢量关系
- 据此可列写关系式如下 e x = e ρ c o s φ − e φ s i n φ e_x=e_\rho cos\varphi-e_\varphi sin\varphi ex=eρcosφ−eφsinφ e y = e φ s i n φ + e φ c o s φ e_y=e_\varphi sin\varphi+e_\varphi cos\varphi ey=eφsinφ+eφcosφ e z = e z e_z=e_z ez=ez
- 将数学表达式转化为矩阵形式 [ e x e y e z ] = [ c o s φ − s i n φ 0 s i n φ c o s φ 0 0 0 1 ] [ e ρ e φ e z ] \begin{bmatrix}e_x\\e_y\\e_z\end{bmatrix} = \begin{bmatrix}cos\varphi&-sin\varphi&0\\sin\varphi&cos\varphi&0\\0&0&1\end{bmatrix} \begin{bmatrix}e_\rho\\e_\varphi\\e_z\end{bmatrix} ⎣⎡exeyez⎦⎤=⎣⎡cosφsinφ0−sinφcosφ0001⎦⎤⎣⎡eρeφez⎦⎤
- 当然,若想将从直角坐标系转为柱坐标系,只需对上式求逆即可。对于方阵,一个重要性质是 A − 1 = A T A^{-1}=A^T A−1=AT,因此,我们只需对上述矩阵转置即可。下面给出结果 [ e ρ e φ e z ] = [ c o s φ s i n φ 0 − s i n φ c o s φ 0 0 0 1 ] [ e x e y e z ] \begin{bmatrix}e_\rho\\e_\varphi\\e_z\end{bmatrix} = \begin{bmatrix}cos\varphi&sin\varphi&0\\-sin\varphi&cos\varphi&0\\0&0&1\end{bmatrix} \begin{bmatrix}e_x\\e_y\\e_z\end{bmatrix} ⎣⎡eρeφez⎦⎤=⎣⎡cosφ−sinφ0sinφcosφ0001⎦⎤⎣⎡exeyez⎦⎤
球坐标系------柱坐标系
两坐标系具有共同的 φ \varphi φ变量
- 下面给出其坐标表示 ( r , θ , φ ) → ( ρ , φ , z ) (r,\theta,\varphi)\to(\rho,\varphi,z) (r,θ,φ)→(ρ,φ,z)
- 以正视图表达两者的坐标单位矢量关系
- 据此可列写关系式如下 e z = e r c o s θ − e θ s i n θ e_z=e_rcos\theta-e_\theta sin\theta ez=ercosθ−eθsinθ e ρ = e r s i n θ + e θ c o s θ e\rho=e_rsin\theta+e_\theta cos\theta eρ=ersinθ+eθcosθ e φ = e φ e_\varphi=e_\varphi eφ=eφ
- 将其转化为矩阵形式如下
[ e ρ e φ e z ] = [ s i n θ c o s θ 0 0 0 1 c o s θ − s i n θ 0 ] [ e r e θ e φ ] \begin{bmatrix} e_\rho \\ e_\varphi \\e_z \end{bmatrix} = \begin{bmatrix} sin\theta & cos\theta &0 \\ 0 & 0 & 1 \\ cos\theta &-sin\theta &0 \end{bmatrix} \begin{bmatrix} e_r \\ e_\theta\\ e_\varphi \end{bmatrix} ⎣⎡eρeφez⎦⎤=⎣⎡sinθ0cosθcosθ0−sinθ010⎦⎤⎣⎡ereθeφ⎦⎤ - 同理,可将柱坐标系转换为球坐标系,只需求其逆。下面给出结果 [ e r e θ e φ ] = [ s i n θ 0 c o s θ c o s θ 0 − s i n θ 0 1 0 ] [ e ρ e φ e z ] \begin{bmatrix} e_r \\ e_\theta\\ e_\varphi \end{bmatrix} = \begin{bmatrix} sin\theta & 0 &cos\theta \\ cos\theta & 0 & -sin\theta \\ 0 &1 &0 \end{bmatrix} \begin{bmatrix} e_\rho \\ e_\varphi \\e_z \end{bmatrix} ⎣⎡ereθeφ⎦⎤=⎣⎡sinθcosθ0001cosθ−sinθ0⎦⎤⎣⎡eρeφez⎦⎤
直角坐标系—球坐标系
由于直角坐标系和球坐标系没有相同元素,因此前文的方法不再适用(再用要付出代价!)
我们采用的办法是:利用已有结果进行迭代
- 将直角坐标系与柱坐标系的关系式代入柱坐标系与球坐标系的关系式中,可以得到直角坐标系与球坐标系的关系式
- 联立两式 [ e x e y e z ] = [ c o s φ − s i n φ 0 s i n φ c o s φ 0 0 0 1 ] [ e ρ e φ e z ] \begin{bmatrix}e_x\\e_y\\e_z\end{bmatrix} = \begin{bmatrix}cos\varphi&-sin\varphi&0\\sin\varphi&cos\varphi&0\\0&0&1\end{bmatrix} \begin{bmatrix}e_\rho\\e_\varphi\\e_z\end{bmatrix} ⎣⎡exeyez⎦⎤=⎣⎡cosφsinφ0−sinφcosφ0001⎦⎤⎣⎡eρeφez⎦⎤ [ e ρ e φ e z ] = [ s i n θ c o s θ 0 0 0 1 c o s θ − s i n θ 0 ] [ e r e θ e φ ] \begin{bmatrix} e_\rho \\ e_\varphi \\e_z \end{bmatrix} = \begin{bmatrix} sin\theta & cos\theta &0 \\ 0 & 0 & 1 \\ cos\theta &-sin\theta &0 \end{bmatrix} \begin{bmatrix} e_r \\ e_\theta\\ e_\varphi \end{bmatrix} ⎣⎡eρeφez⎦⎤=⎣⎡sinθ0cosθcosθ0−sinθ010⎦⎤⎣⎡ereθeφ⎦⎤
- 于是得到 [ e x e y e z ] = [ s i n θ c o s φ c o s θ c o s φ − s i n φ s i n θ s i n φ c o s θ s i n φ c o s φ c o s θ − s i n θ 0 ] [ e r e θ e φ ] \begin{bmatrix}e_x\\e_y\\e_z\end{bmatrix} = \begin{bmatrix}sin\theta cos\varphi & cos\theta cos\varphi &-sin\varphi\\sin\theta sin\varphi & cos\theta sin\varphi & cos\varphi\\cos\theta & -sin\theta & 0 \end{bmatrix}\begin{bmatrix} e_r \\ e_\theta\\ e_\varphi \end{bmatrix} ⎣⎡exeyez⎦⎤=⎣⎡sinθcosφsinθsinφcosθcosθcosφcosθsinφ−sinθ−sinφcosφ0⎦⎤⎣⎡ereθeφ⎦⎤
- 同理可求其逆得到直角坐标系向球坐标系转化的公式,下面直接给出结果 [ e r e θ e φ ] = [ s i n θ c o s φ s i n θ s i n φ c o s θ c o s θ c o s φ c o s θ s i n φ − s i n θ − s i n φ c o s φ 0 ] [ e ρ e φ e z ] \begin{bmatrix} e_r \\ e_\theta\\ e_\varphi \end{bmatrix} =\begin{bmatrix}sin\theta cos\varphi & sin\theta sin\varphi & cos\theta\\ cos\theta cos\varphi &cos\theta sin\varphi & -sin\theta\\ -sin\varphi & cos\varphi & 0 \end{bmatrix} \begin{bmatrix} e_\rho \\ e_\varphi \\e_z \end{bmatrix} ⎣⎡ereθeφ⎦⎤=⎣⎡sinθcosφcosθcosφ−sinφsinθsinφcosθsinφcosφcosθ−sinθ0⎦⎤⎣⎡eρeφez⎦⎤
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· winform 绘制太阳,地球,月球 运作规律
· AI与.NET技术实操系列(五):向量存储与相似性搜索在 .NET 中的实现
· 超详细:普通电脑也行Windows部署deepseek R1训练数据并当服务器共享给他人
· 【硬核科普】Trae如何「偷看」你的代码?零基础破解AI编程运行原理
· 上周热点回顾(3.3-3.9)