It takes only a few simple rules to go from chaos to order
To run the program, go to the root folder and type
go run .
Open the main.go
file and set your own parameters for
Count
- how many particles are simulatedMaxSpeed
- how fast can they go. Putting this too high results in particles leaving the viewportMaxDistance
- how far can particles be to still have effect on each otherSlowingCoefficient
- what multiplier do the particles get slowed down by on each iteration. This helps stabilize the system.Height
andWidth
- the sizes of the viewport
The rules are randomized on each run. If you want your own custom rules, open the setup.go
file, remove the randG()
calls and put your own float64
numbers there.