first step in revamping

This commit is contained in:
tTh
2026-06-02 18:20:09 +02:00
parent 8e14ec2c8d
commit 7ef447b0d8
10 changed files with 58 additions and 43 deletions

View File

@@ -13,20 +13,20 @@ program animation
implicit none
! some configuration constants
integer, parameter :: S_WIDTH = 2048
integer, parameter :: S_HEIGHT = 2048
integer, parameter :: NB_BODY = 666
integer, parameter :: IMG_WIDTH = 640
integer, parameter :: IMG_HEIGHT = 640
integer, parameter :: NB_BODY = 133
!!! WARNING : global variable !!!
type(massbody) :: planets(NB_BODY)
call init_random()
call create_some_planets(planets, 1664e3, S_WIDTH , S_HEIGHT)
call create_some_planets(planets, 1664.3, IMG_WIDTH , IMG_HEIGHT)
call print_barycentre_bodies(planets, 'begin')
call la_grande_boucle(0, 4000, planets)
call la_grande_boucle(0, 667, planets)
STOP ': YOLO TIME *NOW*'
! STOP ': YOLO TIME *NOW*'
!-----------------------------------------------------------------------
contains
@@ -46,16 +46,16 @@ subroutine la_grande_boucle(start, nbre, moons)
call deplace_les_planetes(moons, .TRUE.)
! computing the field (used as a HF in Povray
write (filename, "(a, i5.5, a)") 'WS/nanim/', pass, '.pgm'
write (filename, "(a, i5.5, a)") 'WS/nanim/', pass, '.pnm'
write(0, '(3I5, " * ", a20)') start, nbre, pass, filename
call build_and_write_a_field(S_WIDTH, S_HEIGHT, moons, filename)
call build_and_write_a_field(IMG_WIDTH, IMG_HEIGHT, moons, filename)
! save the current bodies positions (can be used in gnuplot)
! write (filename, "(a, i5.5, a)") 'WS/data/', pass, '.txt'
! call save_bodies_to_txt_file (planets, filename)
write (filename, "(a, i5.5, a)") 'WS/colmap/', pass, '.pnm'
call make_color_map(planets, filename, S_WIDTH, S_HEIGHT)
call make_color_map(planets, filename, IMG_WIDTH, IMG_HEIGHT)
enddo
@@ -134,8 +134,8 @@ subroutine deplace_les_planetes(moons, clipit)
real :: depx, depy, coef
integer, parameter :: EE = 100
integer :: SW = S_WIDTH - EE
integer :: SH = S_HEIGHT - EE
integer :: SW = IMG_WIDTH - EE
integer :: SH = IMG_HEIGHT - EE
do foo=1, ubound(moons, 1)