GIFアニメーション



ソースプログラム
!*************************************** ! Sample of GIF Animation * !*************************************** program gifanim implicit none real sh(4),sl(4),ss(4) integer ndiv(3),nmax,i call fr_ginit call fr_gwsize(380,380,0,0) call fr_gifanimation(-1,'ganim',0,0,0) sh(1) = 230.d0 sh(2) = 230.d0 sh(3) = 0.d0 sh(4) = 0.d0 sl(1) = 0.8d0 sl(2) = 0.d0 sl(3) = 0.d0 sl(4) = 0.8d0 ss(1) = 1.d0 ss(2) = 1.d0 ss(3) = 1.d0 ss(4) = 1.d0 ndiv(1) = 64 ndiv(2) = 0 ndiv(3) = 64 call fr_hlsset(sh,sl,ss,ndiv,3) nmax = 20 do i = 0, nmax-1 call tcont(i,nmax) enddo call fr_gend end program gifanim subroutine tcont(is,ismax) implicit none integer, parameter :: imax=50, jmax=50 real f(0:imax,0:jmax) integer is,ismax,i,j real xmin,xmax,ymin,ymax,dx,dy,r1,r2,pi2,dt1,dt2 real x1,y1,x2,y2,x,y xmin = -2.5d0 xmax = 2.5d0 ymin = -2.5d0 ymax = 2.5d0 dx = (xmax - xmin)/imax dy = (ymax - ymin)/jmax r1 = 1.d0 r2 = 1.3d0 pi2 = 8.d0*atan(1.d0) dt1 = 1*pi2/ismax dt2 = 2*pi2/ismax do j = 0, jmax do i = 0, imax x1 = r2*cos(dt1*is) y1 = r2*sin(dt1*is) x2 = r2*cos(dt2*is) y2 = -r2*sin(dt2*is) x=dx*i+xmin y=dy*j+ymin f(i,j)=exp(-1.0*((x-x1)**2+(y-y1)**2))-exp(-5.0*((x-x2)**2+(y-y2)**2)) enddo enddo call fr_gclear call fr_setcontour(-0.8d0,0.8d0,2) call fr_margin2d(50,10,20,40) call fr_aspect2d(1.0d0,1.d0,0) call fr_frame2d(xmin,xmax,ymin,ymax,6) call fr_xyname('x','y') call fr_contour(f,imax+1,jmax+1,20,-2) end subroutine tcont


Copyright (C) Toshihiro Taguchi, Setsunan University, 2000-2013 All rights reserved.