File: negative-collision.gravitspawn

package info (click to toggle)
gravit 0.5.1%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 10,420 kB
  • ctags: 942
  • sloc: ansic: 6,841; makefile: 63; sh: 43
file content (20 lines) | stat: -rw-r--r-- 586 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
-- vim:syntax=lua tabstop=4

load("functions.lua")

function describe()
    log("Negative and positive massed galaxies charging against each other")
end

function spawn()

	masses = randomfloat(10,1000)
	range = randomfloat(1000,5000)
	speed = randomfloat(.1,1)
	masses = 100
	range = 2000
	speed = 5
	makegalaxy(v(-range,0,0), v(speed,0,0), randomfloat(10,1000), 0, masses, 0, math.floor(spawnparticles/2))
	makegalaxy(v(range,0,0), v(-speed,0,0), randomfloat(10,1000), 0, -masses, math.floor(spawnparticles/2), spawnparticles - math.floor(spawnparticles/2))
	
end