Compare commits

..

3 Commits

Author SHA1 Message Date
Tonton Th
185ee019a8 more doc 2026-04-25 10:35:17 +02:00
Tonton Th
7173a9dc9f remove useless call 2026-04-25 10:34:42 +02:00
Tonton Th
66ecce1c06 better calling 2026-04-25 10:31:09 +02:00
3 changed files with 10 additions and 7 deletions

View File

@@ -24,7 +24,6 @@ subroutine do_randomwalk(nbre, col)
real :: px, py, px2, py2 real :: px, py, px2, py2
px = 0.0 ; py = 0.0 px = 0.0 ; py = 0.0
call genp_move(px, py)
do idx=1, nbre do idx=1, nbre
px2 = px + rand(0) - 0.50 px2 = px + rand(0) - 0.50
py2 = py + rand(0) - 0.50 py2 = py + rand(0) - 0.50

View File

@@ -9,21 +9,22 @@ program spirale
write (0, '(A)') "----[ genplotting spirale ]----" write (0, '(A)') "----[ genplotting spirale ]----"
call genp_init (0, 's.scratch') call genp_init (0, 's.scratch')
call do_spirale (1337) call do_spirale (1337, 0.51, 0.0666, 0.7)
call genp_end (0) call genp_end (0)
contains contains
! --------------------------------------------------------- ! ---------------------------------------------------------
subroutine do_spirale (nbpass) subroutine do_spirale (nbpass, kdist, krad, phy)
integer, intent(in) :: nbpass integer, intent(in) :: nbpass
real, intent(in) :: kdist, krad, phy
integer idx, col integer idx, col
real rad, px, py, dist real rad, px, py, dist
px = 0.0 ; py = 0.0 px = 0.0 ; py = 0.0
call genp_move (px, py) call genp_move (px, py)
do idx=1, nbpass do idx=1, nbpass
dist = real(idx) * 0.51 dist = real(idx) * kdist
rad = real(idx) * 0.0666 rad = (real(idx) * krad) + phy
px = dist * sin(rad) px = dist * sin(rad)
py = dist * cos(rad) py = dist * cos(rad)
col = 3 col = 3

View File

@@ -16,8 +16,11 @@ if this filename is an empty string, *stdout* will be used.
## Use it ## Use it
- call genp_move(x, y) - real xa, ya, xb, yb
- call genp_draw(x, y, c) - integer color
- call genp_move(xa, ya)
- call genp_draw(xa, ya, color)
- call genp_line(xa, ya, xb, yb, color)
## Terminator ## Terminator