adding a lot of grabage
This commit is contained in:
@@ -42,6 +42,8 @@ program movebloubs
|
||||
STOP " : CAN'T OPEN " // trim(outfile) // "FOR WRITE"
|
||||
endif
|
||||
|
||||
! write(0, '("Units: ", 2I5)') inu, outu
|
||||
|
||||
bx = 0.0; by = 0.0; bz = 0.0
|
||||
compteur = 0
|
||||
killed = 0
|
||||
@@ -53,18 +55,20 @@ program movebloubs
|
||||
exit
|
||||
endif
|
||||
|
||||
! moving and boundingboxing
|
||||
call move_bloub (bloub, 0.14)
|
||||
! moving, morphing and boundingboxing
|
||||
call move_bloub (bloub, 0.185)
|
||||
call bound_a_blob (bloub)
|
||||
if (bloub%radius .GT. 0.052) then
|
||||
bloub%radius = bloub%radius * 0.985
|
||||
if (bloub%radius .GT. 0.0151) then
|
||||
bloub%radius = bloub%radius * 0.9970
|
||||
endif
|
||||
|
||||
call green_soylent (bloub)
|
||||
if (.NOT. bloub%alive) then
|
||||
! write(0, '(A)') " KILL!"
|
||||
killed = killed + 1
|
||||
cycle
|
||||
! cycle ! ???
|
||||
endif
|
||||
|
||||
! calcul du barycentre
|
||||
bx = bx + dble(bloub%px)
|
||||
by = by + dble(bloub%py)
|
||||
@@ -83,11 +87,11 @@ program movebloubs
|
||||
! ok, we have read all the bloubs in the input file
|
||||
|
||||
! insert some fancy conditional here
|
||||
if (compteur .LT. 1600) then
|
||||
if (compteur .LT. 3000) then
|
||||
rnd = rand()
|
||||
write (0, '(A,1X,F5.3)') "try to add bloubs, rnd is", rnd
|
||||
if (rnd .LT. 0.02) then
|
||||
call add_more_bloubs(outu, 12, 0.210)
|
||||
write (0, '(A,1X,F9.6)') "try to add bloubs, rnd is", rnd
|
||||
if (rnd .LT. 0.0450) then
|
||||
call add_more_bloubs(outu, 24, 0.0990)
|
||||
endif
|
||||
endif
|
||||
|
||||
@@ -105,22 +109,23 @@ program movebloubs
|
||||
! --------------------------------------------------------------
|
||||
contains
|
||||
|
||||
subroutine add_more_bloubs(un, nbre, wtf)
|
||||
subroutine add_more_bloubs(un, nbre, rayon)
|
||||
integer, intent(in) :: un, nbre
|
||||
real, intent(in) :: wtf
|
||||
real, intent(in) :: rayon
|
||||
type(t_bloubs) :: bloub
|
||||
integer :: foo
|
||||
integer :: foo, count
|
||||
|
||||
write(0, '(A,I4,1X,A)') "adding", nbre, "bloubs"
|
||||
count = nbre+mod(irand(), 7)
|
||||
write(0, '(A,I4,1X,A)') "adding", count, "bloubs"
|
||||
|
||||
do foo=1, nbre
|
||||
do foo=1, count
|
||||
|
||||
bloub%nick = 'newbie '
|
||||
call random_pv(bloub)
|
||||
bloub%radius = wtf
|
||||
bloub%radius = rayon + (0.15*rand())
|
||||
bloub%age = 1
|
||||
bloub%alive = .TRUE.
|
||||
! call display_bloub (bloub, "new bloub")
|
||||
bloub%num = mod(irand(), 42)
|
||||
write(un) bloub ! no error control ?
|
||||
|
||||
enddo
|
||||
|
||||
Reference in New Issue
Block a user