-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgravity.f90
More file actions
35 lines (34 loc) · 796 Bytes
/
Copy pathgravity.f90
File metadata and controls
35 lines (34 loc) · 796 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
program main
use v2dmaths
use pointmass_mod
use scene
implicit none
type(pointmass) :: rock, rock2, rock3
integer :: i
call sceneinit
!moon!!!!
rock%id = 1
rock%coord = [30.0,30.0]
rock%mass = 100
rock%velocity = [0.3,-0.05]
!earth!!!
rock2%id = 2
rock2%coord = [30.0,35.0]
rock2%mass = 1
rock2%velocity = [0.4,-0.05]
!sun!!!
rock3%id = 3
rock3%coord = [70, 32]
rock3%mass = 10000
rock3%velocity = [0.0,0.0]
call sceneadd(rock)
call sceneadd(rock2)
call sceneadd(rock3)
!do the physic
do i = 1, 300
call printscreen()
call sceneprocess()
call system("sleep .1")
end do
end program main
!gfortran v2dmaths.f90 pointmass_mod.f90 scene.f90 gravity.f90 -o gravity