文件名称:空间点到曲线距离计算fortran程序
文件大小:1KB
文件格式:DAT
更新时间:2023-05-27 17:20:07
空间点到曲线距离计算
!DO I=1,IM ! DO J=1,JM ! r_min=10000.0 ! DO k=2,IS ! TEMP=(xs(k)-xs(k-1))/(ys(k)-ys(k-1)) ! TEMPP=(ys(k)-ys(k-1))/(xs(k)-xs(k-1)) ! x0=1.0/(TEMP+TEMPP)*(TEMP*x_heng(I,J)+TEMPP*xs(k)+y_heng(I,J)-ys(k)) ! y0=-1.0*TEMPP*(xs(k)-x0)+ys(k) ! r_heng1(I,J)=sqrt((x_heng(I,J)-xs(k-1))**2+(y_heng(I,J)-ys(k-1))**2) ! IF(r_heng1(I,J).LE.r_min)THEN ! r_min=r_heng1(I,J) ! IF(y_heng(I,J).GE.ys(k-1))THEN ! r_heng(I,J)=r_min ! ELSE ! r_heng(I,J)=-1.0*r_min ! ENDIF ! s_heng(I,J)=ss(k-1) ! x_cz(I,J)=xs(k-1) ! y_cz(I,J)=ys(k-1) ! eta(I,J)=r_heng(I,J)/(s_heng(I,J)+1.E-30) ! ELSE ! ENDIF ! ENDDO ! ENDDO !ENDDO