2022-10-29 07:18:39 +11:00
|
|
|
program essai
|
|
|
|
use usegenplot
|
|
|
|
implicit none
|
|
|
|
|
2022-11-14 09:47:45 +11:00
|
|
|
integer :: foo, bar
|
|
|
|
integer :: nbarg
|
|
|
|
integer :: numframe = 1
|
|
|
|
character(len=32) :: arg
|
|
|
|
|
|
|
|
! write(0, *) "------------ essai graf anim ---------------"
|
|
|
|
|
|
|
|
nbarg = IARGC()
|
|
|
|
if (nbarg .GT. 0) then
|
|
|
|
call GETARG(1, arg)
|
|
|
|
write (0, '(A40, A5)') "argument = ", arg
|
|
|
|
read (arg, *) numframe
|
|
|
|
endif
|
|
|
|
|
|
|
|
write(0, '(A40, I5)') "frame number =", numframe
|
|
|
|
|
|
|
|
call init_genplot("essai.genplot")
|
|
|
|
! call do_frame(7)
|
|
|
|
|
|
|
|
bar = (numframe * 20) - 160
|
|
|
|
do foo=20, 620, 40
|
|
|
|
call gplt_line(foo, 20, bar, 460)
|
|
|
|
call gplt_line(bar, 20, foo, 460)
|
|
|
|
enddo
|
|
|
|
|
|
|
|
contains !------------------------------------------
|
|
|
|
|
|
|
|
subroutine do_frame(color)
|
|
|
|
integer, intent(in) :: color
|
2022-10-29 07:18:39 +11:00
|
|
|
|
2022-11-14 09:47:45 +11:00
|
|
|
call gplt_line( 0, 0, 640, 0)
|
|
|
|
call gplt_line( 0, 480, 640, 480)
|
|
|
|
call gplt_line( 0, 0, 0, 480)
|
|
|
|
call gplt_line(640, 0, 640, 480)
|
2022-10-29 07:18:39 +11:00
|
|
|
|
2022-11-14 09:47:45 +11:00
|
|
|
end subroutine
|
2022-10-29 07:18:39 +11:00
|
|
|
|
|
|
|
end program
|
|
|
|
|