make an image_map added to the code

This commit is contained in:
tTh
2022-12-15 15:03:37 +01:00
parent 793ea535a9
commit c55a7460e0
5 changed files with 14 additions and 8 deletions

View File

@@ -6,13 +6,15 @@
program animation
use realfield
use spitpgm
use spitpgm ! extern module
implicit none
! some configuration constants
integer, parameter :: S_WIDTH = 1024
integer, parameter :: S_HEIGHT = 1024
integer, parameter :: NB_BODY = 50
integer, parameter :: NB_BODY = 51
!!! WARNING : global variable !!!
type(massbody) :: planets(NB_BODY)
@@ -92,7 +94,7 @@ subroutine make_color_map(moons, fname, width, height)
! loop over all the planet's bodies
do ipl=1, ubound(moons, 1)
! compute the "fake" distance
! compute the pseudo distance
dx = fx - moons(ipl)%posx
dy = fy - moons(ipl)%posy
curdist = (dx*dx) + (dy*dy)
@@ -155,9 +157,9 @@ subroutine deplace_les_planetes(moons, clipit)
if (moons(foo)%posy .LT. EE) moons(foo)%posy = SH
endif
moons(foo)%heading = moons(foo)%heading + (0.73*(rand()-0.50))
if (moons(foo)%heading .GT. 6.2831853) moons(foo)%heading = 0.0
if (moons(foo)%heading .LT. 0.0000001) moons(foo)%heading = 0.0
moons(foo)%heading = moons(foo)%heading + (0.78*(rand()-0.50))
if (moons(foo)%heading .GT. 6.283185307) moons(foo)%heading = 0.0
if (moons(foo)%heading .LT. 0.000000001) moons(foo)%heading = 0.0
enddo