Compare commits
3 Commits
845a00d476
...
185ee019a8
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
185ee019a8 | ||
|
|
7173a9dc9f | ||
|
|
66ecce1c06 |
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
7
usage.md
7
usage.md
@@ -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
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user