📄 jiheguangxue.for
字号:
IMPLICIT real*8 A-Z
integer I,N
open(1,file='abc.DAT')
30 continue
! write(*,*)'input the order of rainbow and the maximum of refractive index:'
read(*,*)n,max_m
! For n order rainbow(n=N-2),the maximum of m must less or equal n+1,otherwise the phenomenon of rainbow won't appear!
if(max_m>n+1)then
write(*,*)'Bad input!!!'
goto 30
end if
N=n+2
max_m_sub_one=max_m-1
! For n order rainbow(n=N-2),the maximum of m must less or equal n+1,otherwise function asin(a) will out of define
kmax_m_sub_one=1000*max_m_sub_one
do I=0,kmax_m_sub_one-1
! write(*,*)I
m=0.001*I+1
! write(*,*)m
u=m*m-1.0
l=(N-1.0)*(N-1.0)-1.0
c=1.0*u/l
! write(*,*)c
a=sqrt(c)
! write(*,*)a
Trg=asin(a)
! write(*,*)Trg
th=2.0*Trg-2.0*(N-1.0)*Acos(1.0*cos(Trg)/m)
th=-1.*th/3.141592654
10 if(th>=2)then
th=th-2
goto 10
end if
20 if(th>1)then
th=2-th
goto 20
end if
th=th*180.0
write(1,*)m,th
end do
end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -