Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/balysv/space-clojure
A minimal Newtonian gravity and collision simulator in Clojure
https://github.com/balysv/space-clojure
clojure collision-simulator collision-strategy gravity newton simulation
Last synced: 30 days ago
JSON representation
A minimal Newtonian gravity and collision simulator in Clojure
- Host: GitHub
- URL: https://github.com/balysv/space-clojure
- Owner: balysv
- Created: 2016-03-25T13:11:37.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2016-05-15T22:00:43.000Z (over 8 years ago)
- Last Synced: 2024-11-14T18:34:26.630Z (3 months ago)
- Topics: clojure, collision-simulator, collision-strategy, gravity, newton, simulation
- Language: Clojure
- Size: 4.49 MB
- Stars: 4
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Space
A minimal Newtonian gravity and collision simulator in Clojure
## Demo
Demo rendered with the help of [Quil](https://github.com/quil/quil)
#### Gravitational constant adjustments
![Gravity](https://raw.githubusercontent.com/balysv/space/master/assets/gravity.gif)
#### Permutations applied to every entity in space. Currently supported:
- `apply-movement` - adjust position according to velocity vector
- `apply-gravity` - applies gravitational forces from each entity to another
- `apply-inelastic-collisions` - collision strategy to merge entities into one preserving their properties and momentum
- `apply-elastic-collisions` - collision strategy to bounce entities that touch with equivalent force![Permutations](https://raw.githubusercontent.com/balysv/space/master/assets/permutations.gif)
## Running
The project uses [Leiningen](http://leiningen.org/)
`lein run` or `lein repl`
and
`lein test`
## License
Eclipse Public Licence 1.0 or any later version.