Files
GenPlotting90/spirale.f90
2026-04-25 13:12:16 +02:00

36 lines
874 B
Fortran

! SPIRALING...
! new Thu Apr 23 04:27:03 PM UTC 2026
!
program spirale
use genplotting
implicit none
write (0, '(A)') "----[ genplotting spirale ]----"
call genp_init (0, 'WS/spirale.scratch')
call do_spirale (1337, 0.51, 0.0666, 0.7)
call genp_end (0)
contains
! ---------------------------------------------------------
subroutine do_spirale (nbpass, kdist, krad, phy)
integer, intent(in) :: nbpass
real, intent(in) :: kdist, krad, phy
integer idx, col
real rad, px, py, dist
px = 0.0 ; py = 0.0
call genp_move (px, py)
do idx=1, nbpass
dist = real(idx) * kdist
rad = (real(idx) * krad) + phy
px = dist * sin(rad)
py = dist * cos(rad)
col = 3
call genp_draw (px, py, col)
enddo
end subroutine
! ---------------------------------------------------------
end program