什么是球谐函数?
球谐函数是拉普拉斯方程的球坐标系形式解的角度部分。在经典场论、量子力学等领域广泛应用。
在原子核形变方面的一个应用是用球谐函数展开原子核表面,公式如下:
$R = R( heta, psi, t) = R_0(1+sum_{lambda}^{infty}sum_{mu = -lambda}^{lambda}{alpha}_{lambda mu}(t)Y_{lambda mu}( heta, psi))$
其中$alpha$表示振幅,Y即为球谐函数。
Y20,Y30作图
通过查维基百科,可得到Y20,Y30公式,利用python可作图。
1 # -*- coding: utf-8 -*- 2 """ 3 Created on Tue Jun 16 15:50:57 2020 4 5 @author: kurrrr 6 """ 7 8 import math 9 import matplotlib.pyplot as plt 10 11 x = [2*math.pi/360*xx for xx in range(0, 360)] 12 y = [(5/16/math.pi)**0.5*(3*math.cos(xx)**2-1) for xx in x] 13 14 ax = plt.subplot(111, projection='polar') 15 ax.plot(x, y) 16 plt.show() 17 18 # add imformation 19 plt.text(1, 0.8, "Y20", fontdict={'size': 16, 'color': 'r'})
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
1 # -*- coding: utf-8 -*- 2 """ 3 Created on Tue Jun 16 15:50:57 2020 4 5 @author: kurrrr 6 """ 7 8 import math 9 import matplotlib.pyplot as plt 10 11 x = [2*math.pi/360*xx for xx in range(0, 360)] 12 y = [(5/16/math.pi)**0.5*(3*math.cos(xx)**2-1) for xx in x] 13 14 ax = plt.subplot(111, projection='polar') 15 ax.plot(x, y) 16 plt.show() 17 18 # add imformation 19 plt.text(1, 0.8, "Y20", fontdict={'size': 16, 'color': 'r'})
- 列表生成式
- 绘制极坐标图像
- 三角函数的使用
得到图如下