make an image_map added to the code
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user